Adding the original version from the blog.

This commit is contained in:
Joachim Lusiardi 2013-07-23 10:25:34 -07:00
parent 57fd4d97f2
commit 44fc0a0493
3 changed files with 62 additions and 0 deletions

42
pom.xml Normal file
View File

@ -0,0 +1,42 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.lusiardi.maven</groupId>
<artifactId>basics1</artifactId>
<packaging>jar</packaging>
<version>0.1</version>
<name>Einfuehrung in Maven</name>
<url>http://wp.lusiardi.de/?p=197</url>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>2.1</version>
<configuration>
<source>
1.5
</source>
<target>
1.5
</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,8 @@
package b1;
public class Math {
public static int square(int a) {
return a * a;
}
}

View File

@ -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));
}
}