summaryrefslogtreecommitdiffstats
path: root/test/jrummikub/model/StoneTrayTest.java
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-10 03:54:48 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-10 03:54:48 +0200
commit3b49b2053e9f9d26b73db0ffc8380a60706ee095 (patch)
tree9678d5abb4af070bbf0fd89c684e91f5fd472c31 /test/jrummikub/model/StoneTrayTest.java
parent4a860e53cf6f2f97f18785673399498609e6504b (diff)
downloadJRummikub-3b49b2053e9f9d26b73db0ffc8380a60706ee095.tar
JRummikub-3b49b2053e9f9d26b73db0ffc8380a60706ee095.zip
Added all missing comments
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@213 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub/model/StoneTrayTest.java')
-rw-r--r--test/jrummikub/model/StoneTrayTest.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/jrummikub/model/StoneTrayTest.java b/test/jrummikub/model/StoneTrayTest.java
index 1c8b241..84fc799 100644
--- a/test/jrummikub/model/StoneTrayTest.java
+++ b/test/jrummikub/model/StoneTrayTest.java
@@ -7,7 +7,9 @@ import jrummikub.util.Pair;
import org.junit.*;
import static org.junit.Assert.*;
-
+/**
+ * Tests for {@link StoneTray}
+ */
public class StoneTrayTest {
class Thing implements Sizeable {
private float width;
@@ -30,12 +32,13 @@ public class StoneTrayTest {
}
private StoneTray<Thing> testTray;
-
+ /** */
@Before
public void createTray() {
testTray = new StoneTray<Thing>();
}
+ /** */
@Test
public void testDrop() {
Thing firstThing = new Thing(3, 4);
@@ -50,6 +53,7 @@ public class StoneTrayTest {
assertEquals(8.5, secondPosition.getY(), 0.00001);
}
+ /** */
@Test
public void testDropNull() {
testTray.drop(null, new Position(0, 0));
@@ -57,6 +61,7 @@ public class StoneTrayTest {
}
// Leftshift
+ /** */
@Test
public void testLeftDrop() {
Thing firstThing = new Thing(5, 5);
@@ -72,6 +77,7 @@ public class StoneTrayTest {
}
// Rightshift
+ /** */
@Test
public void testRightDrop() {
Thing firstThing = new Thing(5, 5);
@@ -87,6 +93,7 @@ public class StoneTrayTest {
}
// Upshift
+ /** */
@Test
public void testUpDrop() {
Thing firstThing = new Thing(5, 5);
@@ -102,6 +109,7 @@ public class StoneTrayTest {
}
// Downshift
+ /** */
@Test
public void testDownDrop() {
Thing firstThing = new Thing(5, 5);
@@ -116,6 +124,7 @@ public class StoneTrayTest {
assertEquals(-2, secondPosition.getY(), 0.00001);
}
+ /** */
@Test
public void testDoubleShift() {
Thing firstThing = new Thing(5, 5);
@@ -137,6 +146,7 @@ public class StoneTrayTest {
assertEquals(1, thirdPosition.getY(), 0.00001);
}
+ /** */
@Test
public void testWrongPickUp() {
Thing firstThing = new Thing(5, 5);
@@ -145,6 +155,7 @@ public class StoneTrayTest {
assertNull(testTray.pickUp(testPosition));
}
+ /** */
@Test
public void testPickUpByObject() {
Thing firstThing = new Thing(5, 5);
@@ -158,6 +169,7 @@ public class StoneTrayTest {
assertTrue(testTray.iterator().hasNext());
}
+ /** */
@Test
public void testRightPickUp() {
Thing firstThing = new Thing(5, 5);
@@ -169,6 +181,7 @@ public class StoneTrayTest {
assertNull(testTray.pickUp(testPosition));
}
+ /** */
@Test
public void testIterate() {
List<Thing> testThings = new ArrayList<Thing>();
@@ -191,6 +204,7 @@ public class StoneTrayTest {
assertTrue(testPositions.isEmpty());
}
+ /** */
@Test
public void testClone() {
Thing firstThing = new Thing(5, 5);