#34 Init Maven Project
This commit is contained in:
49
easydrop/pom.xml
Normal file
49
easydrop/pom.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.rwu</groupId>
|
||||
<artifactId>easydrop</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>easydrop</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>checkstyle-check</id>
|
||||
<phase>verify</phase>
|
||||
<configuration>
|
||||
<configLocation>google_checks.xml</configLocation>
|
||||
<failOnViolation>true</failOnViolation>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
13
easydrop/src/main/java/de/rwu/App.java
Normal file
13
easydrop/src/main/java/de/rwu/App.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package de.rwu;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
7
easydrop/src/main/java/de/rwu/DemoClass.java
Normal file
7
easydrop/src/main/java/de/rwu/DemoClass.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package de.rwu;
|
||||
|
||||
public class DemoClass {
|
||||
public String demoMethod() {
|
||||
return "success!";
|
||||
}
|
||||
}
|
||||
38
easydrop/src/test/java/de/rwu/AppTest.java
Normal file
38
easydrop/src/test/java/de/rwu/AppTest.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package de.rwu;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
14
easydrop/src/test/java/de/rwu/DemoClassTest.java
Normal file
14
easydrop/src/test/java/de/rwu/DemoClassTest.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package de.rwu;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class DemoClassTest {
|
||||
@Test
|
||||
public void testDemoMethod() {
|
||||
DemoClass demoClass = new DemoClass();
|
||||
String result = demoClass.demoMethod();
|
||||
assertEquals("success!", result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user