Esempio n. 1
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));
 }
Esempio n. 2
0
 @Test
 public void answerCorrectlyButNotSoonEnough() {
   g.setAnswerTime(-1);
   g.take(P1);
   g.answer(true);
   assertEquals(-200, g.scoreFor(P1));
 }
Esempio n. 3
0
 @Test(expected = NoCurrentPlayerException.class)
 public void takeAnswerWrongAnswerCorrectlyWithoutTakingScoresSafe() {
   g.take(P1);
   g.answer(false);
   assertEquals(-200, g.scoreFor(P1));
   g.answer(false);
 }
Esempio n. 4
0
 @Test
 public void readQuestionSometimeTriesToAnswerButIsIncorrect() {
   g.take(P2);
   g.answer(false);
   assertEquals(-200, g.scoreFor(P2));
   assertEquals(0, g.scoreFor(P1));
 }
Esempio n. 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());
 }
Esempio n. 6
0
 @Test
 public void attemptToTakeWhenAlreadyTakenBySelf() {
   g.take(P1);
   g.take(P1);
 }
Esempio n. 7
0
 @Test(expected = AlreadyTakeException.class)
 public void attemptToTakeWhenAlreadyTakenByAnother() {
   g.take(P1);
   g.take(P2);
 }