Search in sources :

Example 1 with RenderingEngineAboutToBeRemovedEvent

use of org.cytoscape.view.presentation.events.RenderingEngineAboutToBeRemovedEvent in project cytoscape-api by cytoscape.

the class PresentationEventsTest method testEvents.

@Test
public void testEvents() {
    final RenderingEngineManager manager = mock(RenderingEngineManager.class);
    final RenderingEngine<CyNetwork> engine = mock(RenderingEngine.class);
    final RenderingEngineAddedEvent createdEvent = new RenderingEngineAddedEvent(manager, engine);
    assertEquals(manager, createdEvent.getSource());
    assertEquals(engine, createdEvent.getRenderingEngine());
    final RenderingEngineAboutToBeRemovedEvent destroyedEvent = new RenderingEngineAboutToBeRemovedEvent(manager, engine);
    assertEquals(manager, destroyedEvent.getSource());
    assertEquals(engine, destroyedEvent.getRenderingEngine());
}
Also used : RenderingEngineAddedEvent(org.cytoscape.view.presentation.events.RenderingEngineAddedEvent) CyNetwork(org.cytoscape.model.CyNetwork) RenderingEngineAboutToBeRemovedEvent(org.cytoscape.view.presentation.events.RenderingEngineAboutToBeRemovedEvent) Test(org.junit.Test)

Aggregations

CyNetwork (org.cytoscape.model.CyNetwork)1 RenderingEngineAboutToBeRemovedEvent (org.cytoscape.view.presentation.events.RenderingEngineAboutToBeRemovedEvent)1 RenderingEngineAddedEvent (org.cytoscape.view.presentation.events.RenderingEngineAddedEvent)1 Test (org.junit.Test)1