Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated dependency

  • Loading branch information...
commit 74245ed73ff5e856dca9c96e69ed8530ed666b7d 2 parents 3fc744e + 0f72617
John Ferguson Smart authored
2  gameoflife-core/pom.xml
View
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<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>
- <parent>
+ <parent>
<artifactId>gameoflife</artifactId>
<groupId>com.wakaleo.gameoflife</groupId>
<version>0.8.30-SNAPSHOT</version>
23 gameoflife-core/src/main/java/com/wakaleo/gameoflife/domain/Grid.java
View
@@ -106,26 +106,5 @@ public void setCellAt(int x, int y, Cell cell) {
}
}
return contentCopy;
- }
-
- private Cell[][] unusedMethod() {
- // TODO: needs refactoring
- Cell[][] contentCopy = new Cell[getHeight()][getWidth()];
- for (int row = 0; row < getHeight(); row++) {
- for (int column = 0; column < getWidth(); column++) {
- contentCopy[row][column] = cells[row][column];
- }
- }
- return contentCopy;
- }
-
-
- public void infiniteRecursiveLoop() {
-
- int i = 0;
- if (i < 1) {
- infiniteRecursiveLoop();
- }
- }
-
+ }
}
1  gameoflife-core/src/test/java/com/wakaleo/gameoflife/domain/WhenYouCreateANewUniverse.java
View
@@ -1,7 +1,6 @@
package com.wakaleo.gameoflife.domain;
import org.junit.Test;
-import org.junit.Ignore;
import com.wakaleo.gameoflife.domain.Universe;
1  gameoflife-core/src/test/java/com/wakaleo/gameoflife/domain/WhenYouPrintAGrid.java
View
@@ -4,7 +4,6 @@
import static org.hamcrest.Matchers.is;
import static com.wakaleo.gameoflife.domain.Cell.*;
-import org.junit.Ignore;
import org.junit.Test;
import com.wakaleo.gameoflife.domain.Cell;
21 gameoflife-core/src/test/java/com/wakaleo/gameoflife/hamcrest/HasSizeMatcher.java
View
@@ -1,21 +0,0 @@
-package com.wakaleo.gameoflife.hamcrest;
-
-import java.util.Collection;
-import org.hamcrest.Description;
-import org.hamcrest.TypeSafeMatcher;
-
-public class HasSizeMatcher extends TypeSafeMatcher<Collection<? extends Object>> {
- private int expectedSize;
-
- public HasSizeMatcher(int expectedSize) {
- this.expectedSize = expectedSize;
- }
-
- public boolean matchesSafely(Collection<? extends Object> collection) {
- return (collection.size() == expectedSize);
- }
-
- public void describeTo(Description description) {
- description.appendText("a collection of size ").appendValue(expectedSize);
- }
-}
13 gameoflife-core/src/test/java/com/wakaleo/gameoflife/hamcrest/MyMatchers.java
View
@@ -1,13 +0,0 @@
-package com.wakaleo.gameoflife.hamcrest;
-
-import java.util.Collection;
-import org.hamcrest.Factory;
-import org.hamcrest.Matcher;
-
-public class MyMatchers {
-
- @Factory
- public static Matcher<Collection<? extends Object>> hasSize( int expectedSize ) {
- return new HasSizeMatcher(expectedSize);
- }
-}
27 gameoflife-core/src/test/java/com/wakaleo/gameoflife/hamcrest/WhenIUseMyCustomHamcrestMatchers.java
View
@@ -1,27 +0,0 @@
-package com.wakaleo.gameoflife.hamcrest;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.junit.Test;
-
-import static com.wakaleo.gameoflife.hamcrest.MyMatchers.hasSize;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
-
-public class WhenIUseMyCustomHamcrestMatchers {
-
- @Test
- public void thehasSizeMatcherShouldMatchACollectionWithExpectedSize() {
- List<String> items = new ArrayList<String>();
- items.add("java");
- assertThat(items, hasSize(1));
- }
-
- @Test
- public void weCanUseCustomMatchersWithOtherMatchers() {
- List<String> items = new ArrayList<String>();
- items.add("java");
- assertThat(items, allOf(hasSize(1), hasItem("java")));
- }
-}
-
12 gameoflife-core/src/test/stories/CountingThings.story
View
@@ -0,0 +1,12 @@
+scenario 'Adding two integers', {
+ given 'two integer values of 1 and 2', {
+ a = 1
+ b = 2
+ }
+ when 'we calculate the sum of the two values', {
+ sum = a + b
+ }
+ then 'the sum should be 3', {
+ sum.shouldBe 3
+ }
+}
5 gameoflife-core/src/test/stories/MultiplyingThings.story
View
@@ -0,0 +1,5 @@
+scenario 'Adding two integers', {
+ given 'two integer values of 2 and 3'
+ when 'we calculate the product of the two values'
+ then 'the product should be 6'
+}
38 pom.xml
View
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<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">
+<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>com.wakaleo.gameoflife</groupId>
<artifactId>gameoflife</artifactId>
@@ -9,12 +10,12 @@
<url>https://github.com/wakaleo/game-of-life</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <easyb.version>1.4</easyb.version>
+ <easyb.version>1.5</easyb.version>
<cobertura.version>2.4</cobertura.version>
<!-- A workaround for a bug in PMD -->
<targetJdk>1.6</targetJdk>
<github.account>wakaleo</github.account>
- <thucydides.version>0.4.26</thucydides.version>
+ <thucydides.version>0.7.10</thucydides.version>
</properties>
<scm>
<connection>scm:git:git@github.com:${github.account}/game-of-life.git</connection>
@@ -46,9 +47,6 @@
<include>**/When*.java</include>
<include>**/*Test.java</include>
</includes>
- <parallel>classes</parallel>
- <threadCount>4</threadCount>
- <perCoreThreadCount>true</perCoreThreadCount>
</configuration>
</plugin>
<plugin>
@@ -95,6 +93,24 @@
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.easyb</groupId>
+ <artifactId>maven-easyb-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <storyType>html</storyType>
+ <storyReport>target/easyb/easyb.html</storyReport>
+ <easybTestDirectory>src/test/stories</easybTestDirectory>
+ <jvmArguments>-Xmx512m -Dwebdriver.driver=${webdriver.driver}</jvmArguments>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
@@ -132,8 +148,8 @@
<dependencies>
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.2</version>
+ <artifactId>junit-dep</artifactId>
+ <version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -142,6 +158,12 @@
<version>1.1</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.9.0</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<modules>
Please sign in to comment.
Something went wrong with that request. Please try again.