Browse Source

corrected test newGameInitializationFigurePositions

-> other fields should be initial null
feat-figureMovement
JD 4 years ago
parent
commit
2e025f35ad
  1. 8
      fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java

8
fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java

@ -24,16 +24,20 @@ class GameTest
g.initNewGame(); g.initNewGame();
for (int i = 0; i < Figure.fieldLength; i++) // row for (int i = 0; i < Figure.fieldLength; i++) // row
{
for (int j = 0; j < Figure.fieldLength; j++) // col
{ {
if (i == Game.whiteRowOther if (i == Game.whiteRowOther
|| i == Game.whiteRowFarmer || i == Game.whiteRowFarmer
|| i == Game.blackRowOther || i == Game.blackRowOther
|| i == Game.blackRowFarmer) || i == Game.blackRowFarmer)
{
for (int j = 0; j < Figure.fieldLength; j++) // col
{ {
assertNotEquals(null, g.mField[i * Figure.fieldLength + j]); assertNotEquals(null, g.mField[i * Figure.fieldLength + j]);
} }
else
{
assertEquals(null, g.mField[i * Figure.fieldLength + j]);
}
} }
} }
} }
Loading…
Cancel
Save