예제 #1
0
 public int computeScoreOfGame(Frame[] frames) {
   int scoreOfGame = 0;
   for (Frame frame : frames) {
     scoreOfGame += frame.getScore();
   }
   return scoreOfGame;
 }
예제 #2
0
 protected Frame createFrameWithScore(int score) {
   Frame frame1 = mock(Frame.class);
   when(frame1.getScore()).thenReturn(score);
   return frame1;
 }