@Test public void picksCorrectHomeWinColor() throws Exception { // Arrange when(resultMock.isHomeWin()).thenReturn(true); // Act Color pickedColor = colorPicker.pickResultColor(resultMock); // Assert assertThat(pickedColor, is(Colors.HOME_WIN_BG_COLOR)); }
@Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); when(resultMock.isHomeWin()).thenReturn(false); when(resultMock.isDraw()).thenReturn(false); when(resultMock.isAwayWin()).thenReturn(false); colorPicker = new ColorPicker(); }