Search in sources :

Example 1 with CyNetworkViewManager

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

the class AbstractNetworkViewEventTest method testGetNetworkView.

@Test
public final void testGetNetworkView() {
    final CyNetworkViewManager networkViewManager = mock(CyNetworkViewManager.class);
    final CyNetworkView networkView = mock(CyNetworkView.class);
    final AbstractNetworkViewEvent event = new AbstractNetworkViewEvent(networkViewManager, Object.class, networkView);
    assertEquals("Network returned by getNetworkView() is *not* the one passed into the constructor!", networkView, event.getNetworkView());
}
Also used : CyNetworkViewManager(org.cytoscape.view.model.CyNetworkViewManager) CyNetworkView(org.cytoscape.view.model.CyNetworkView) Test(org.junit.Test)

Example 2 with CyNetworkViewManager

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

the class NetworkViewAboutToBeDestroyedEventTest method testGetNetworkView.

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

Example 3 with CyNetworkViewManager

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

the class NetworkViewAddedEventTest method testNullNetworkConstructorFailure.

@Test
public final void testNullNetworkConstructorFailure() {
    final CyNetworkViewManager networkViewManager = mock(CyNetworkViewManager.class);
    try {
        final NetworkViewAddedEvent event = new NetworkViewAddedEvent(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)

Example 4 with CyNetworkViewManager

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

the class NetworkViewAddedEventTest method testGetNetworkView.

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

Example 5 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)

Aggregations

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