/** * Tests each setter method to ensure that it sends an event notification. */ public void testEventNotification() { RendererChangeDetector detector = new RendererChangeDetector(); BarRenderer r1 = new BarRenderer(); r1.addChangeListener(detector); detector.setNotified(false); r1.setPaint(Color.red); assertTrue(detector.getNotified()); }
/** * Tests each setter method to ensure that it sends an event notification. */ public void testEventNotification() { RendererChangeDetector detector = new RendererChangeDetector(); BarRenderer r1 = new BarRenderer(); r1.addChangeListener(detector); detector.setNotified(false); r1.setBasePaint(Color.red); assertTrue(detector.getNotified()); }