Skip to content

Commit 8c67434

Browse files
eviltestereviltester
authored andcommitted
updated due to edits for chap 1,2,3,4,5
1 parent 4012a13 commit 8c67434

File tree

21 files changed

+154
-27
lines changed

21 files changed

+154
-27
lines changed

source/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,22 @@
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616
</properties>
1717

18-
1918
<dependencies>
2019

2120
<dependency>
2221
<groupId>junit</groupId>
2322
<artifactId>junit</artifactId>
2423
<version>4.11</version>
2524
</dependency>
25+
2626
</dependencies>
2727

2828
<build>
2929
<plugins>
3030
<plugin>
3131
<groupId>org.apache.maven.plugins</groupId>
3232
<artifactId>maven-compiler-plugin</artifactId>
33+
<version>3.1</version>
3334
<configuration>
3435
<source>1.7</source>
3536
<target>1.7</target>

source/reportingpom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
http://maven.apache.org/surefire/maven-surefire-report-plugin/report-mojo.html
1717
1818
mvn clean test -Dmaven.source=reportingpom.xml
19-
mvn surefire-report:report -Dmaven.source=reportingpom.xml
2019
-->
2120

2221
<properties>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.javafortesters.domainobject;
22

3-
43
public class TestAppEnv {
54

65
public static final String DOMAIN = "192.123.0.3";
@@ -9,4 +8,4 @@ public class TestAppEnv {
98
public static String getUrl() {
109
return "http://" + DOMAIN + ":" + PORT;
1110
}
12-
}
11+
}

source/src/main/java/com/javafortesters/domainobject/empty/TestAppEnv.java renamed to source/src/main/java/com/javafortesters/domainobject/interim/TestAppEnv.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static String getUrl() {
1010
*/
1111

1212

13-
package com.javafortesters.domainobject.empty;
13+
package com.javafortesters.domainobject.interim;
1414

1515
public class TestAppEnv {
1616

source/src/test/java/com/javafortesters/myfirsttest/empty/MyFirstTest.java

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.javafortesters.myfirsttest.examples.naming;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.assertTrue;
6+
7+
public class NameClass {
8+
9+
@Test
10+
public void whenClassNameHasNoTestInItThenItIsNotRun(){
11+
// this test will not run from maven so i can make
12+
// a failing test... it fails in the IDE
13+
assertTrue("whenClassNameHasNoTestInItThenItIsNotRun",
14+
false);
15+
}
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.javafortesters.myfirsttest.examples.naming;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.assertTrue;
6+
7+
public class NameClassTest {
8+
9+
@Test
10+
public void whenClassHasTestAtEndThenTestIsRun(){
11+
// this test will run from maven so it needs to pass
12+
assertTrue("whenClassHasTestAtEndThenTestIsRun",
13+
true);
14+
}
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.javafortesters.myfirsttest.examples.naming;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.assertTrue;
6+
7+
public class NameTestClass {
8+
9+
@Test
10+
public void whenClassHasTestInMiddleThenTestIsNotRun(){
11+
// this test will not run from maven so i can make
12+
// a failing test... it fails in the IDE
13+
assertTrue("whenClassHasTestInMiddleThenTestIsNotRun",
14+
false);
15+
}
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.javafortesters.myfirsttest.examples.naming;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.assertTrue;
6+
7+
public class TestNameClass {
8+
9+
@Test
10+
public void whenClassHasTestAtFrontThenTestIsRun(){
11+
// this test will run from maven so it needs to pass
12+
assertTrue("whenClassHasTestAtFrontThenTestIsRun",
13+
true);
14+
}
15+
}

source/src/test/java/com/javafortesters/myfirsttest/exercises/MyFirstTestExercises.java renamed to source/src/test/java/com/javafortesters/myfirsttest/exercises/MyFirstTestExercisesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import static org.junit.Assert.assertEquals;
88

99

10-
public class MyFirstTestExercises {
10+
public class MyFirstTestExercisesTest {
1111

1212
@Test
1313
public void canAddTwoPlusTwo(){

0 commit comments

Comments
 (0)