diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c002c5a --- /dev/null +++ b/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + de.lusiardi.maven + basics1 + jar + 0.1 + Einfuehrung in Maven + http://wp.lusiardi.de/?p=197 + + + + + org.apache.maven.plugins + + + maven-compiler-plugin + + 2.1 + + + 1.5 + + + 1.5 + + UTF-8 + + + + + + + junit + junit + 4.8.2 + test + + + diff --git a/src/main/java/b1/Math.java b/src/main/java/b1/Math.java new file mode 100644 index 0000000..e111fe5 --- /dev/null +++ b/src/main/java/b1/Math.java @@ -0,0 +1,8 @@ +package b1; + +public class Math { + + public static int square(int a) { + return a * a; + } +} diff --git a/src/test/java/b1/MathTest.java b/src/test/java/b1/MathTest.java new file mode 100644 index 0000000..21a5999 --- /dev/null +++ b/src/test/java/b1/MathTest.java @@ -0,0 +1,12 @@ +package b1; + +import org.junit.Assert; +import org.junit.Test; + +public class MathTest { + + @Test + public void testSqure() { + Assert.assertEquals(16, Math.square(4)); + } +} \ No newline at end of file