Search in sources :

Example 1 with SetCurrentNetworkEvent

use of org.cytoscape.application.events.SetCurrentNetworkEvent in project cytoscape-api by cytoscape.

the class SetCurrentNetworkEventTest method testGoodGetNetwork.

@Test
public void testGoodGetNetwork() {
    CyApplicationManager source = mock(CyApplicationManager.class);
    CyNetwork n = mock(CyNetwork.class);
    SetCurrentNetworkEvent e = new SetCurrentNetworkEvent(source, n);
    assertNotNull(e.getNetwork());
    assertEquals(n, e.getNetwork());
}
Also used : CyApplicationManager(org.cytoscape.application.CyApplicationManager) CyNetwork(org.cytoscape.model.CyNetwork) SetCurrentNetworkEvent(org.cytoscape.application.events.SetCurrentNetworkEvent) Test(org.junit.Test)

Example 2 with SetCurrentNetworkEvent

use of org.cytoscape.application.events.SetCurrentNetworkEvent in project cytoscape-api by cytoscape.

the class SetCurrentNetworkEventTest method testNullGetNetwork.

@Test
public void testNullGetNetwork() {
    CyApplicationManager source = mock(CyApplicationManager.class);
    SetCurrentNetworkEvent e = new SetCurrentNetworkEvent(source, null);
    assertNull(e.getNetwork());
}
Also used : CyApplicationManager(org.cytoscape.application.CyApplicationManager) SetCurrentNetworkEvent(org.cytoscape.application.events.SetCurrentNetworkEvent) Test(org.junit.Test)

Aggregations

CyApplicationManager (org.cytoscape.application.CyApplicationManager)2 SetCurrentNetworkEvent (org.cytoscape.application.events.SetCurrentNetworkEvent)2 Test (org.junit.Test)2 CyNetwork (org.cytoscape.model.CyNetwork)1