Added all missing comments

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@213 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-05-10 03:54:48 +02:00
parent 4a860e53cf
commit 3b49b2053e
38 changed files with 696 additions and 263 deletions

View file

@ -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);