예제 #1
0
 @Test
 public void handlesNullResult() throws Exception {
   // Act
   Color pickedColor = colorPicker.pickResultColor(null);
   // Assert
   assertThat(pickedColor, is(Colors.DEFAULT_RESULT_COLOR));
 }
예제 #2
0
 @Test
 public void picksCorrectAwayWinColor() throws Exception {
   // Arrange
   when(resultMock.isAwayWin()).thenReturn(true);
   // Act
   Color pickedColor = colorPicker.pickResultColor(resultMock);
   // Assert
   assertThat(pickedColor, is(Colors.AWAY_WIN_BG_COLOR));
 }
예제 #3
0
 @Test
 public void picksCorrectDrawColor() throws Exception {
   // Arrange
   when(resultMock.isDraw()).thenReturn(true);
   // Act
   Color pickedColor = colorPicker.pickResultColor(resultMock);
   // Assert
   assertThat(pickedColor, is(Colors.DRAW_BG_COLOR));
 }