@Test public void testAddScore() throws Exception { scoresDb.store(score); List<Score> scores = scoresDb.getAllScores(); assertThat(scores.size()).isEqualTo(1); assertThat(scores.get(0).getTotal()).isEqualTo(1); assertThat(scores.get(0).date).isEqualTo(scoreDate); List<AnswerRecord> answerRecordList = scores.get(0).getAnswerRecordList(); assertThat(answerRecordList.size()).isEqualTo(2); assertThat(answerRecordList.get(0).preposition.word).isEqualTo("aus"); assertThat(answerRecordList.get(1).preposition.word).isEqualTo("bei"); assertThat(answerRecordList.get(0).playerAnswer).isEqualTo(Preposition.type.DATIV); assertThat(answerRecordList.get(1).playerAnswer).isEqualTo(Preposition.type.AKK); }
@Test public void testDbStart() throws Exception { assertThat(scoresDb.getAllScores()).isEmpty(); }