Skip to content

Commit aeb33b8

Browse files
committed
update project structure
update project structure
1 parent 9ce3491 commit aeb33b8

7 files changed

Lines changed: 37 additions & 19 deletions

File tree

simple-junit/.classpath

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
4+
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
5+
<classpathentry kind="output" path="target/classes"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7+
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
8+
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
9+
</classpath>

simple-junit/.project

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>simple-junit</name>
4+
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
5+
<projects/>
6+
<buildSpec>
7+
<buildCommand>
8+
<name>org.eclipse.jdt.core.javabuilder</name>
9+
</buildCommand>
10+
</buildSpec>
11+
<natures>
12+
<nature>org.eclipse.jdt.core.javanature</nature>
13+
</natures>
14+
</projectDescription>

simple-junit/pom.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.hmkcode</groupId>
6-
<artifactId>junit</artifactId>
7-
<version>0.0.1-SNAPSHOT</version>
6+
<artifactId>simple-junit</artifactId>
7+
<version>1.0-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

10-
<name>junit</name>
10+
<name>simple-junit</name>
1111
<url>http://maven.apache.org</url>
1212

1313
<properties>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
</properties>
1616

1717
<dependencies>
18-
<dependency>
19-
<groupId>junit</groupId>
20-
<artifactId>junit</artifactId>
21-
<version>4.11</version>
22-
<scope>test</scope>
23-
</dependency>
24-
18+
<dependency>
19+
<groupId>junit</groupId>
20+
<artifactId>junit</artifactId>
21+
<version>4.11</version>
22+
<scope>test</scope>
23+
</dependency>
2524
</dependencies>
2625
</project>

simple-junit/Math.java renamed to simple-junit/src/main/java/com/hmkcode/junit/Math.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ public double subtract(double x, double y){
2626

2727

2828

29-
}
29+
}

simple-junit/MathTest.java renamed to simple-junit/src/test/java/com/hmkcode/junit/MathTest.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414

1515
/**
16-
* Tests for {@link Functions}.
16+
* Tests for {@link Math}.
1717
*
1818
* @author hmkcode@gmail.com (Hani HMK)
1919
*/
2020
@RunWith(JUnit4.class)
2121
public class MathTest {
2222

2323
@Rule
24-
public Timeout globalTimeout = new Timeout(3000); // 0 seconds max per method tested
24+
public Timeout globalTimeout = new Timeout(3000); // 3 seconds max per method tested
2525

2626

2727
com.hmkcode.junit.Math math = new com.hmkcode.junit.Math();
@@ -59,9 +59,5 @@ public void testSubtract(){
5959
org.junit.Assert.assertTrue("failure - not equal", math.subtract(3, 2) == 1);
6060
}
6161

62-
public static void main(String[] args){
63-
org.junit.runner.JUnitCore.runClasses(MathTest.class);
64-
65-
}
66-
}
67-
62+
63+
}
929 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)