use of com.igormaznitsa.mindmap.swing.panel.MindMapConfigListener in project netbeans-mmd-plugin by raydac.
the class MindMapPanelConfigTest method testMakeFullCopyOf.
@Test
public void testMakeFullCopyOf() {
final MindMapPanelConfig dst = new MindMapPanelConfig();
final MindMapPanelConfig src = new MindMapPanelConfig();
assertTrue(dst.isDropShadow());
assertTrue(dst.isDrawBackground());
src.setDrawBackground(false);
src.setDropShadow(false);
final AtomicInteger callCounter = new AtomicInteger();
final MindMapConfigListener lstnr = new MindMapConfigListener() {
@Override
public void onConfigurationPropertyChanged(MindMapPanelConfig changedConfig) {
callCounter.incrementAndGet();
}
};
src.addConfigurationListener(lstnr);
dst.makeFullCopyOf(src, true, true);
assertFalse(dst.isDropShadow());
assertFalse(dst.isDrawBackground());
assertEquals(1, callCounter.get());
}
Aggregations