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