Example #1
0
 @Test(expected = NoCurrentPlayerException.class)
 public void takeAnswerWrongAnswerCorrectlyWithoutTakingScoresSafe() {
   g.take(P1);
   g.answer(false);
   assertEquals(-200, g.scoreFor(P1));
   g.answer(false);
 }
Example #2
0
 @Test
 public void readQuestionSomeoneTriesToAnswerDoesNotSomeoneElseAnswersIncorrectly() {
   g.take(P1);
   g.answer(false);
   g.take(P2);
   g.answer(false);
   assertEquals(-200, g.scoreFor(P1));
   assertEquals(-200, g.scoreFor(P2));
 }
Example #3
0
 @Test
 public void answerCorrectlyButNotSoonEnough() {
   g.setAnswerTime(-1);
   g.take(P1);
   g.answer(true);
   assertEquals(-200, g.scoreFor(P1));
 }
Example #4
0
 @Test
 public void readQuestionSometimeTriesToAnswerButIsIncorrect() {
   g.take(P2);
   g.answer(false);
   assertEquals(-200, g.scoreFor(P2));
   assertEquals(0, g.scoreFor(P1));
 }
Example #5
0
 @Test
 public void readQuestionSomoneTriesToAnswerAndDoes() {
   g.take(P1);
   g.answer(true);
   assertEquals(200, g.scoreFor(P1));
   assertEquals(0, g.scoreFor(P2));
   assertTrue(g.retrieve("C", 200).isUsed());
 }