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());
}
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());
}
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!");
}
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());
}
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());
}
Aggregations