@Test public void testReset() { System.out.println("reset"); ColorsDispatcher instance = ColorsDispatcherFactory.getColorsDispatcher(); Color first = instance.getNextColor(); Assert.assertNotNull(first); instance.getNextColor(); instance.getNextColor(); instance.reset(); assertEquals(first, instance.getNextColor()); }
public void reset() { assignedColors.clear(); increment = LEVEL_MAX; bits = 0; level = LEVEL_MAX - 1; assignedColors.add(new Color(255, 255, 0)); assignedColors.add(new Color(127, 127, 0)); }
CycleColors implements ColorsDispatcher { public void reset() { assignedColors.clear(); increment = LEVEL_MAX; bits = 0; level = LEVEL_MAX - 1; assignedColors.add(new Color(255, 255, 0)); assignedColors.add(new Color(127, 127, 0)); } }
CycleColors implements ColorsDispatcher { public void reset() { assignedColors.clear(); increment = LEVEL_MAX; bits = 0; level = LEVEL_MAX - 1; assignedColors.add(new Color(255, 255, 0)); assignedColors.add(new Color(127, 127, 0)); } CycleColors(); }
CycleColors implements ColorsDispatcher { public void reset() { assignedColors.clear(); increment = LEVEL_MAX; bits = 0; level = LEVEL_MAX - 1; assignedColors.add(new Color(255, 255, 0)); assignedColors.add(new Color(127, 127, 0)); } CycleColors(); void reset(); Color getNextColor(); }
CycleColors implements ColorsDispatcher { public void reset() { assignedColors.clear(); increment = LEVEL_MAX; bits = 0; level = LEVEL_MAX - 1; assignedColors.add(new Color(255, 255, 0)); assignedColors.add(new Color(127, 127, 0)); } CycleColors(); void reset(); Color getNextColor();  }