From 44fc0a0493be9e05b54bd1e66b7844c5bd1d182f Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Tue, 23 Jul 2013 10:25:34 -0700 Subject: [PATCH] Adding the original version from the blog. --- pom.xml | 42 ++++++++++++++++++++++++++++++++++ src/main/java/b1/Math.java | 8 +++++++ src/test/java/b1/MathTest.java | 12 ++++++++++ 3 files changed, 62 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/b1/Math.java create mode 100644 src/test/java/b1/MathTest.java 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