| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff 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> | ||
| Original file line number | Diff line number | Diff 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> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,24 +3,23 @@ | |||
| 3 | 3 | <modelVersion>4.0.0</modelVersion> | |
| 4 | 4 | ||
| 5 | 5 | <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> | ||
| 8 | 8 | <packaging>jar</packaging> | |
| 9 | 9 | ||
| 10 | - <name>junit</name> | ||
| 10 | + <name>simple-junit</name> | ||
| 11 | 11 | <url>http://maven.apache.org</url> | |
| 12 | 12 | ||
| 13 | 13 | <properties> | |
| 14 | 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| 15 | 15 | </properties> | |
| 16 | 16 | ||
| 17 | 17 | <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> | ||
| 25 | 24 | </dependencies> | |
| 26 | 25 | </project> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,4 +26,4 @@ public double subtract(double x, double y){ | |||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | - } | ||
| 29 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,15 +13,15 @@ | |||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | /** | |
| 16 | - * Tests for {@link Functions}. | ||
| 16 | + * Tests for {@link Math}. | ||
| 17 | 17 | * | |
| 18 | 18 | * @author hmkcode@gmail.com (Hani HMK) | |
| 19 | 19 | */ | |
| 20 | 20 | @RunWith(JUnit4.class) | |
| 21 | 21 | public class MathTest { | |
| 22 | 22 | ||
| 23 | 23 | @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 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | com.hmkcode.junit.Math math = new com.hmkcode.junit.Math(); | |
@@ -59,9 +59,5 @@ public void testSubtract(){ | |||
| 59 | 59 | org.junit.Assert.assertTrue("failure - not equal", math.subtract(3, 2) == 1); | |
| 60 | 60 | } | |
| 61 | 61 | ||
| 62 | - public static void main(String[] args){ | ||
| 63 | - org.junit.runner.JUnitCore.runClasses(MathTest.class); | ||
| 64 | - | ||
| 65 | - } | ||
| 66 | - } | ||
| 67 | - | ||
| 62 | + | ||
| 63 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments