use of org.cytoscape.model.CyNetworkManager in project cytoscape-api by cytoscape.
the class NetworkAboutToBeDestroyedEventTest method testGetNetwork.
@Test
public final void testGetNetwork() {
final CyNetworkManager networkManager = mock(CyNetworkManager.class);
final CyNetwork network = mock(CyNetwork.class);
final NetworkAboutToBeDestroyedEvent event = new NetworkAboutToBeDestroyedEvent(networkManager, network);
assertEquals("Network returned by getNetwork() is *not* the one passed into the constructor!", network, event.getNetwork());
}
use of org.cytoscape.model.CyNetworkManager in project cytoscape-api by cytoscape.
the class NetworkAboutToBeDestroyedEventTest method testNullNetworkConstructorFailure.
@Test
public final void testNullNetworkConstructorFailure() {
final CyNetworkManager networkManager = mock(CyNetworkManager.class);
try {
final NetworkAboutToBeDestroyedEvent event = new NetworkAboutToBeDestroyedEvent(networkManager, null);
} catch (final NullPointerException e) {
return;
}
fail("The expected NullPointerException was *not* triggered!");
}
use of org.cytoscape.model.CyNetworkManager in project cytoscape-api by cytoscape.
the class NetworkDestroyedEventTest method testGetNetwork.
@Test
public final void testGetNetwork() {
final CyNetworkManager networkManager = mock(CyNetworkManager.class);
final NetworkDestroyedEvent event = new NetworkDestroyedEvent(networkManager);
assertEquals("NetworkManager returned by getSource() is *not* the one passed into the constructor!", networkManager, event.getSource());
}
use of org.cytoscape.model.CyNetworkManager in project cytoscape-api by cytoscape.
the class AbstractNetworkEventTest method testNullNetworkConstructorFailure.
@Test(expected = NullPointerException.class)
public final void testNullNetworkConstructorFailure() {
final CyNetworkManager networkManager = mock(CyNetworkManager.class);
new AbstractNetworkEvent(networkManager, Object.class, null);
}
Aggregations