Search in sources :

Example 6 with CyNetworkViewManager

use of org.cytoscape.view.model.CyNetworkViewManager in project cytoscape-api by cytoscape.

the class NetworkViewDestroyedEventTest method testGetNetwork.

@Test
public final void testGetNetwork() {
    final CyNetworkViewManager networkViewManager = mock(CyNetworkViewManager.class);
    final NetworkViewDestroyedEvent event = new NetworkViewDestroyedEvent(networkViewManager);
    assertEquals("NetworkViewManager returned by getSource() is *not* the one passed into the constructor!", networkViewManager, event.getSource());
}
Also used : CyNetworkViewManager(org.cytoscape.view.model.CyNetworkViewManager) Test(org.junit.Test)

Example 7 with CyNetworkViewManager

use of org.cytoscape.view.model.CyNetworkViewManager in project cytoscape-api by cytoscape.

the class NetworkViewAboutToBeDestroyedEventTest method testNullNetworkConstructorFailure.

@Test
public final void testNullNetworkConstructorFailure() {
    final CyNetworkViewManager networkViewManager = mock(CyNetworkViewManager.class);
    try {
        final NetworkViewAboutToBeDestroyedEvent event = new NetworkViewAboutToBeDestroyedEvent(networkViewManager, null);
    } catch (final NullPointerException e) {
        return;
    }
    fail("The expected NullPointerException was *not* triggered!");
}
Also used : CyNetworkViewManager(org.cytoscape.view.model.CyNetworkViewManager) Test(org.junit.Test)

Aggregations

CyNetworkViewManager (org.cytoscape.view.model.CyNetworkViewManager)7 Test (org.junit.Test)7 CyNetworkView (org.cytoscape.view.model.CyNetworkView)3