@Test public void testAddColorAddsColorToAvailablePool() throws Exception { GraphColor expected = graphColors[2]; assertEquals(expected, fixture.getColor()); fixture.addColor(expected.getPrimary()); assertEquals(expected, fixture.getColor()); }
@Test public void testAddColorDoesNotAddNonExistingColor() throws Exception { GraphColor expected = graphColors[1]; GraphColor graphColor = graphColors[2]; assertEquals(graphColor, fixture.getColor()); fixture.addColor(graphColor.getBackground()); assertEquals(expected, fixture.getColor()); }