assertEquals(4, statusIcon.numberToDisplay);
}
@Test
public void unstableBuildsShouldDisplayYellowIcon() throws Exception {
BuildStatusAggregator aggregatorMock = Mockito.mock(BuildStatusAggregator.class);
Mockito.when(aggregatorMock.hasNoResults()).thenReturn(false);
Mockito.when(aggregatorMock.getNbBrokenBuilds()).thenReturn(0);
Mockito.when(aggregatorMock.getNbUnstableBuilds()).thenReturn(2);
BuildStatusIcon statusIcon = (BuildStatusIcon) BuildStatusIcon.createIcon(aggregatorMock);
assertIconEquals("yellow.png", statusIcon.icon);
assertEquals("2 unstable builds", statusIcon.toolTipText);
assertEquals(2, statusIcon.numberToDisplay);