summaryrefslogtreecommitdiffstats
path: root/test/jrummikub
diff options
context:
space:
mode:
Diffstat (limited to 'test/jrummikub')
-rw-r--r--test/jrummikub/model/PositionTest.java10
-rw-r--r--test/jrummikub/model/StoneSetTest.java3
2 files changed, 13 insertions, 0 deletions
diff --git a/test/jrummikub/model/PositionTest.java b/test/jrummikub/model/PositionTest.java
index 2812f9c..1f7ca5f 100644
--- a/test/jrummikub/model/PositionTest.java
+++ b/test/jrummikub/model/PositionTest.java
@@ -6,14 +6,24 @@ import java.util.Set;
import org.junit.*;
import static org.junit.Assert.*;
+/**
+ * test functions of Position-Class
+ *
+ */
public class PositionTest {
+ /**
+ * String for debugging and testing
+ */
@Test
public void testToString() {
Position pos = new Position(6, 2);
assertEquals("Position[x=6.0,y=2.0]", pos.toString());
}
+ /**
+ * tests hashing
+ */
@Test
public void testEqualsAndHashCode() {
Position pos1 = new Position(0, 0);
diff --git a/test/jrummikub/model/StoneSetTest.java b/test/jrummikub/model/StoneSetTest.java
index 2575f22..e2962d4 100644
--- a/test/jrummikub/model/StoneSetTest.java
+++ b/test/jrummikub/model/StoneSetTest.java
@@ -175,6 +175,9 @@ public class StoneSetTest {
assertEquals(i, testSet.size());
}
+ /**
+ * String for Testing
+ */
@Test
public void testToString() {
StoneSet testSet = new StoneSet(Arrays.asList(new Stone(2, BLUE),