コード例 #1
0
 @Test
 public void shouldSetOrUpdateScore() {
   int score = 100;
   String username = "******";
   gameRepository.setOrUpdateScore(username, score);
   assertThat(gameRepository.getUserCount(), is(not(0)));
 }
コード例 #2
0
 @Test
 public void shouldUpdateScoreIfExistingScoreOfUserIsNotHighest() {
   int score = 100;
   databaseHelper.addUser(new User("some User", 80));
   String username = "******";
   gameRepository.setOrUpdateScore(username, score);
   assertThat(gameRepository.getUserCount(), is(not(0)));
 }