Tests verkürzt
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@472 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
479384d6bf
commit
80f0c0d43f
1 changed files with 31 additions and 68 deletions
|
@ -51,6 +51,37 @@ public class RoundControlTest {
|
||||||
private boolean roundEnded;
|
private boolean roundEnded;
|
||||||
private Score roundScore;
|
private Score roundScore;
|
||||||
protected boolean roundRestarted;
|
protected boolean roundRestarted;
|
||||||
|
|
||||||
|
Stone blueFour = new Stone(4, BLUE);
|
||||||
|
Stone blackFour = new Stone(4, BLACK);
|
||||||
|
Stone redFour = new Stone(4, RED);
|
||||||
|
Stone orangeFour = new Stone(4, ORANGE);
|
||||||
|
|
||||||
|
Stone blueFive = new Stone(5, BLUE);
|
||||||
|
Stone blueSix = new Stone(6, BLUE);
|
||||||
|
Stone blueSeven = new Stone(7, BLUE);
|
||||||
|
Stone blackSeven = new Stone(7, BLACK);
|
||||||
|
Stone redSeven = new Stone(7, RED);
|
||||||
|
Stone orangeSeven = new Stone(7, ORANGE);
|
||||||
|
|
||||||
|
Stone blueOne = new Stone(1, BLUE);
|
||||||
|
Stone blueTwo = new Stone(2, BLUE);
|
||||||
|
Stone blueThree = new Stone(3, BLUE);
|
||||||
|
|
||||||
|
Stone blueTen = new Stone(10, BLUE);
|
||||||
|
Stone redTen = new Stone(10, RED);
|
||||||
|
Stone blueEleven = new Stone(11, BLUE);
|
||||||
|
|
||||||
|
Stone redEight = new Stone(8, RED);
|
||||||
|
Stone redNine = new Stone(9, RED);
|
||||||
|
Stone redEleven = new Stone(11, RED);
|
||||||
|
|
||||||
|
Stone blueEight = new Stone(8, BLUE);
|
||||||
|
Stone blackEight = new Stone(8, BLACK);
|
||||||
|
Stone orangeEight = new Stone(8, ORANGE);
|
||||||
|
|
||||||
|
Stone redOne = new Stone(1, RED);
|
||||||
|
Stone blackOne = new Stone(1, BLACK);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For each test create a round control initialized by a mock model and view
|
* For each test create a round control initialized by a mock model and view
|
||||||
|
@ -143,10 +174,6 @@ public class RoundControlTest {
|
||||||
}
|
}
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
|
|
||||||
Stone blueOne = new Stone(1, BLUE);
|
|
||||||
Stone blueTwo = new Stone(2, BLUE);
|
|
||||||
Stone blueThree = new Stone(3, BLUE);
|
|
||||||
|
|
||||||
IHand hand = roundControl.clonedHand;
|
IHand hand = roundControl.clonedHand;
|
||||||
hand.drop(blueOne, new Position(0, 0));
|
hand.drop(blueOne, new Position(0, 0));
|
||||||
hand.drop(blueTwo, new Position(0, 0));
|
hand.drop(blueTwo, new Position(0, 0));
|
||||||
|
@ -198,10 +225,6 @@ public class RoundControlTest {
|
||||||
}
|
}
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
|
|
||||||
Stone blueOne = new Stone(1, BLUE);
|
|
||||||
Stone blueTwo = new Stone(2, BLUE);
|
|
||||||
Stone blueThree = new Stone(3, BLUE);
|
|
||||||
|
|
||||||
IHand hand = roundControl.clonedHand;
|
IHand hand = roundControl.clonedHand;
|
||||||
hand.drop(blueOne, new Position(0, 0));
|
hand.drop(blueOne, new Position(0, 0));
|
||||||
hand.drop(blueTwo, new Position(0, 0));
|
hand.drop(blueTwo, new Position(0, 0));
|
||||||
|
@ -213,10 +236,6 @@ public class RoundControlTest {
|
||||||
|
|
||||||
view.tablePanel.clickEvent.emit(new Position(0, 0));
|
view.tablePanel.clickEvent.emit(new Position(0, 0));
|
||||||
|
|
||||||
Stone blueTen = new Stone(10, BLUE);
|
|
||||||
Stone redTen = new Stone(10, RED);
|
|
||||||
Stone blueEleven = new Stone(11, BLUE);
|
|
||||||
|
|
||||||
assertFalse(roundState.getActivePlayer().getLaidOut());
|
assertFalse(roundState.getActivePlayer().getLaidOut());
|
||||||
|
|
||||||
hand.drop(blueTen, new Position(0, 0));
|
hand.drop(blueTen, new Position(0, 0));
|
||||||
|
@ -246,15 +265,6 @@ public class RoundControlTest {
|
||||||
}
|
}
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
// Fake Turn to put stones on the table
|
// Fake Turn to put stones on the table
|
||||||
Stone blueSeven = new Stone(7, BLUE);
|
|
||||||
Stone blackSeven = new Stone(7, BLACK);
|
|
||||||
Stone redSeven = new Stone(7, RED);
|
|
||||||
Stone orangeSeven = new Stone(7, ORANGE);
|
|
||||||
|
|
||||||
Stone blueOne = new Stone(1, BLUE);
|
|
||||||
Stone blueTwo = new Stone(2, BLUE);
|
|
||||||
Stone blueThree = new Stone(3, BLUE);
|
|
||||||
|
|
||||||
IHand hand = roundControl.clonedHand;
|
IHand hand = roundControl.clonedHand;
|
||||||
hand.drop(blueOne, new Position(0, 0));
|
hand.drop(blueOne, new Position(0, 0));
|
||||||
hand.drop(blueTwo, new Position(0, 0));
|
hand.drop(blueTwo, new Position(0, 0));
|
||||||
|
@ -282,10 +292,6 @@ public class RoundControlTest {
|
||||||
assertEquals(2, roundState.getTable().getSize());
|
assertEquals(2, roundState.getTable().getSize());
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
|
|
||||||
Stone redEight = new Stone(8, RED);
|
|
||||||
Stone redNine = new Stone(9, RED);
|
|
||||||
Stone redTen = new Stone(10, RED);
|
|
||||||
|
|
||||||
hand = roundControl.clonedHand;
|
hand = roundControl.clonedHand;
|
||||||
hand.drop(redEight, new Position(0, 0));
|
hand.drop(redEight, new Position(0, 0));
|
||||||
hand.drop(redNine, new Position(0, 0));
|
hand.drop(redNine, new Position(0, 0));
|
||||||
|
@ -318,15 +324,6 @@ public class RoundControlTest {
|
||||||
}
|
}
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
// Fake Turn to put stones on the table
|
// Fake Turn to put stones on the table
|
||||||
Stone blueSeven = new Stone(7, BLUE);
|
|
||||||
Stone blackSeven = new Stone(7, BLACK);
|
|
||||||
Stone redSeven = new Stone(7, RED);
|
|
||||||
Stone orangeSeven = new Stone(7, ORANGE);
|
|
||||||
|
|
||||||
Stone blueOne = new Stone(1, BLUE);
|
|
||||||
Stone blueTwo = new Stone(2, BLUE);
|
|
||||||
Stone blueThree = new Stone(3, BLUE);
|
|
||||||
|
|
||||||
IHand hand = roundControl.clonedHand;
|
IHand hand = roundControl.clonedHand;
|
||||||
hand.drop(blueOne, new Position(0, 0));
|
hand.drop(blueOne, new Position(0, 0));
|
||||||
hand.drop(blueTwo, new Position(0, 0));
|
hand.drop(blueTwo, new Position(0, 0));
|
||||||
|
@ -354,11 +351,6 @@ public class RoundControlTest {
|
||||||
assertEquals(2, roundState.getTable().getSize());
|
assertEquals(2, roundState.getTable().getSize());
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
|
|
||||||
Stone redEight = new Stone(8, RED);
|
|
||||||
Stone redNine = new Stone(9, RED);
|
|
||||||
Stone redTen = new Stone(10, RED);
|
|
||||||
Stone redEleven = new Stone(11, RED);
|
|
||||||
|
|
||||||
hand = roundControl.clonedHand;
|
hand = roundControl.clonedHand;
|
||||||
hand.drop(redEight, new Position(0, 0));
|
hand.drop(redEight, new Position(0, 0));
|
||||||
hand.drop(redNine, new Position(0, 0));
|
hand.drop(redNine, new Position(0, 0));
|
||||||
|
@ -393,15 +385,6 @@ public class RoundControlTest {
|
||||||
}
|
}
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
// Fake Turn to put stones on the table
|
// Fake Turn to put stones on the table
|
||||||
Stone blueFour = new Stone(4, BLUE);
|
|
||||||
Stone blackFour = new Stone(4, BLACK);
|
|
||||||
Stone redFour = new Stone(4, RED);
|
|
||||||
Stone orangeFour = new Stone(4, ORANGE);
|
|
||||||
|
|
||||||
Stone blueFive = new Stone(5, BLUE);
|
|
||||||
Stone blueSix = new Stone(6, BLUE);
|
|
||||||
Stone blueSeven = new Stone(7, BLUE);
|
|
||||||
|
|
||||||
IHand hand = roundControl.clonedHand;
|
IHand hand = roundControl.clonedHand;
|
||||||
hand.drop(blueFive, new Position(0, 0));
|
hand.drop(blueFive, new Position(0, 0));
|
||||||
hand.drop(blueSix, new Position(0, 0));
|
hand.drop(blueSix, new Position(0, 0));
|
||||||
|
@ -458,15 +441,6 @@ public class RoundControlTest {
|
||||||
}
|
}
|
||||||
view.startTurnEvent.emit();
|
view.startTurnEvent.emit();
|
||||||
// Fake Turn to put stones on the table
|
// Fake Turn to put stones on the table
|
||||||
Stone blueSeven = new Stone(7, BLUE);
|
|
||||||
Stone blackSeven = new Stone(7, BLACK);
|
|
||||||
Stone redSeven = new Stone(7, RED);
|
|
||||||
Stone orangeSeven = new Stone(7, ORANGE);
|
|
||||||
|
|
||||||
Stone blueOne = new Stone(1, BLUE);
|
|
||||||
Stone blueTwo = new Stone(2, BLUE);
|
|
||||||
Stone blueThree = new Stone(3, BLUE);
|
|
||||||
|
|
||||||
IHand hand = roundControl.clonedHand;
|
IHand hand = roundControl.clonedHand;
|
||||||
hand.drop(blueOne, new Position(0, 0));
|
hand.drop(blueOne, new Position(0, 0));
|
||||||
hand.drop(blueTwo, new Position(0, 0));
|
hand.drop(blueTwo, new Position(0, 0));
|
||||||
|
@ -665,11 +639,6 @@ public class RoundControlTest {
|
||||||
assertSame(BottomPanelType.HUMAN_HAND_PANEL, view.bottomPanelType);
|
assertSame(BottomPanelType.HUMAN_HAND_PANEL, view.bottomPanelType);
|
||||||
IHand hand = testRound.clonedHand;
|
IHand hand = testRound.clonedHand;
|
||||||
|
|
||||||
Stone blueEight = new Stone(8, BLUE);
|
|
||||||
Stone blackEight = new Stone(8, BLACK);
|
|
||||||
Stone redEight = new Stone(8, RED);
|
|
||||||
Stone orangeEight = new Stone(8, ORANGE);
|
|
||||||
|
|
||||||
hand.drop(redEight, new Position(0, 0));
|
hand.drop(redEight, new Position(0, 0));
|
||||||
hand.drop(blueEight, new Position(0, 0));
|
hand.drop(blueEight, new Position(0, 0));
|
||||||
hand.drop(blackEight, new Position(0, 0));
|
hand.drop(blackEight, new Position(0, 0));
|
||||||
|
@ -698,12 +667,6 @@ public class RoundControlTest {
|
||||||
public void testTableDifference() {
|
public void testTableDifference() {
|
||||||
MockTable oldTable = new MockTable();
|
MockTable oldTable = new MockTable();
|
||||||
MockTable newTable = new MockTable();
|
MockTable newTable = new MockTable();
|
||||||
Stone blueOne = new Stone(1, BLUE);
|
|
||||||
Stone redOne = new Stone(1, RED);
|
|
||||||
Stone blackOne = new Stone(1, BLACK);
|
|
||||||
Stone blueTwo = new Stone(2, BLUE);
|
|
||||||
Stone blueThree = new Stone(3, BLUE);
|
|
||||||
Stone blueFour = new Stone(4, BLUE);
|
|
||||||
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne, blackOne));
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne, blackOne));
|
||||||
StoneSet oldSet2 = new StoneSet(blueTwo);
|
StoneSet oldSet2 = new StoneSet(blueTwo);
|
||||||
oldTable.drop(oldSet1, new Position(0, 0));
|
oldTable.drop(oldSet1, new Position(0, 0));
|
||||||
|
|
Reference in a new issue