Skip to content

Commit 16ded67

Browse files
committed
starting point for code club kata
1 parent 595350d commit 16ded67

9 files changed

+4
-40
lines changed

.classpath

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="src" path="test"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
6-
<classpathentry kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer" exported="true"/>
7-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
6+
<classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/>
7+
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
8+
<classpathentry kind="lib" path="C:/svn/trunk/build/target/ivy/repo-cache/mockito/mockito-all/jars/mockito-all-1.9.5.jar" sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-all/1.9.5/b8086d4e4daa361fc746abea62f77a2ae55d3ed9/mockito-all-1.9.5-sources.jar"/>
9+
<classpathentry kind="lib" path="C:/svn/trunk/build/target/ivy/repo-cache/junit/junit/jars/junit-4.11.jar" sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/junit/junit/4.11/28e0ad201304e4a4abf999ca0570b7cffc352c3c/junit-4.11-sources.jar"/>
810
<classpathentry kind="output" path="bin"/>
9-
<classpathentry sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2/73d0340eaecbb0ec9d3e0ace90547ef08cbfaf27/commons-collections-3.2-sources.jar" kind="lib" path="/Users/trish/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2/f951934aa5ae5a88d7e6dfaa6d32307d834a88be/commons-collections-3.2.jar" exported="true"/>
10-
<classpathentry sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.0.4.RELEASE/c330409ccb1e521ffbadedfb3d4b79b67f38677f/spring-core-4.0.4.RELEASE-sources.jar" kind="lib" path="/Users/trish/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.0.4.RELEASE/1e49cd206349aa6d1ee272acd67cb56c05452b95/spring-core-4.0.4.RELEASE.jar" exported="true"/>
11-
<classpathentry sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-all/1.9.5/b8086d4e4daa361fc746abea62f77a2ae55d3ed9/mockito-all-1.9.5-sources.jar" kind="lib" path="/Users/trish/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-all/1.9.5/79a8984096fc6591c1e3690e07d41be506356fa5/mockito-all-1.9.5.jar" exported="true"/>
12-
<classpathentry sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/junit/junit/4.11/28e0ad201304e4a4abf999ca0570b7cffc352c3c/junit-4.11-sources.jar" kind="lib" path="/Users/trish/.gradle/caches/modules-2/files-2.1/junit/junit/4.11/4e031bb61df09069aeb2bffb4019e7a5034a4ee0/junit-4.11.jar" exported="true"/>
13-
<classpathentry sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.1.3/28bb0405fddaf04f15058fbfbe01fe2780d7d3b6/commons-logging-1.1.3-sources.jar" kind="lib" path="/Users/trish/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.1.3/f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f/commons-logging-1.1.3.jar" exported="true"/>
14-
<classpathentry sourcepath="/Users/trish/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar" kind="lib" path="/Users/trish/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar" exported="true"/>
1511
</classpath>

bin/halterman/command/Client.class

-152 Bytes
Binary file not shown.

bin/halterman/command/Command.class

-137 Bytes
Binary file not shown.
-1013 Bytes
Binary file not shown.

bin/halterman/command/Light.class

-658 Bytes
Binary file not shown.
-576 Bytes
Binary file not shown.
-572 Bytes
Binary file not shown.
Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,6 @@
11
package halterman.command;
22

3-
import static org.mockito.Mockito.verify;
4-
5-
import org.junit.Before;
6-
import org.junit.Test;
7-
import org.mockito.InjectMocks;
8-
import org.mockito.Mock;
9-
import org.mockito.MockitoAnnotations;
10-
import org.mockito.Spy;
11-
123
public class CommandPatternTest {
134

14-
@InjectMocks
15-
private Switch lightSwitch;
16-
17-
@Mock
18-
Light light;
19-
20-
@Spy
21-
Command lightsOn = new LightOnCommand(light);
22-
23-
@Before
24-
public void setUp() {
25-
MockitoAnnotations.initMocks(this);
26-
lightSwitch = new Switch();
27-
lightSwitch.setCommand(lightsOn);
28-
}
29-
30-
@Test
31-
public void shouldTurnOnLight() {
32-
lightSwitch.pressButton();
33-
34-
verify(light).switchOn();
35-
}
36-
375

386
}

0 commit comments

Comments
 (0)