Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Contributing java starting point

  • Loading branch information...
commit dcbbb9fa31c545232487c36aec96a5f297808327 1 parent 61b6b97
@jeanlaurent jeanlaurent authored
View
2  .gitignore
@@ -1 +1,3 @@
*.gem
+target
+.idea
View
11 starting_points/java/README.md
@@ -0,0 +1,11 @@
+## Simple Java Setup using Maven
+
+Adding popular testing libs :
+
+* junit
+* fest-assert
+* mockito
+
+to run testsuites just run "mvn clean test"
+
+Project load into popular IDE (Idea, Eclipse, NetBeans) by importing the files as a maven project.
View
56 starting_points/java/pom.xml
@@ -0,0 +1,56 @@
+<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>coderetreat</groupId>
+ <artifactId>conway</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.8.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.easytesting</groupId>
+ <artifactId>fest-assert</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
View
8 starting_points/java/src/main/java/coderetreat/GameOfLife.java
@@ -0,0 +1,8 @@
+package coderetreat;
+
+public class GameOfLife {
+
+ public String foo() {
+ return "qix";
+ }
+}
View
13 starting_points/java/src/test/java/coderetreat/GameOfLifeTest.java
@@ -0,0 +1,13 @@
+package coderetreat;
+
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
+public class GameOfLifeTest {
+
+ @Test
+ public void whenFooIsCalled_thenItReturnsBar() {
+ assertThat(new GameOfLife().foo()).isEqualTo("bar");
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.