use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.
the class SetCurrentNetworkViewEventTest method testGoodGetNetworkView.
@Test
public void testGoodGetNetworkView() {
CyApplicationManager source = mock(CyApplicationManager.class);
CyNetworkView n = mock(CyNetworkView.class);
SetCurrentNetworkViewEvent e = new SetCurrentNetworkViewEvent(source, n);
assertNotNull(e.getNetworkView());
assertEquals(n, e.getNetworkView());
}
use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.
the class VizmapEventsTest method testVisualStyleSetEvent.
@Test
public void testVisualStyleSetEvent() {
final CyNetworkView view = mock(CyNetworkView.class);
final VisualStyleSetEvent event = new VisualStyleSetEvent(manager, style, view);
assertEquals(style, event.getVisualStyle());
assertEquals(view, event.getNetworkView());
}
use of org.cytoscape.view.model.CyNetworkView 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.CyNetworkView in project cytoscape-api by cytoscape.
the class FitContentEventTest method testEvents.
@Test
public void testEvents() {
CyNetworkView networkView = mock(CyNetworkView.class);
FitContentEvent ev3 = new FitContentEvent(networkView);
assertEquals(networkView, ev3.getSource());
}
use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.
the class FitSelectedEventTest method testEvents.
@Test
public void testEvents() {
CyNetworkView networkView = mock(CyNetworkView.class);
FitSelectedEvent ev3 = new FitSelectedEvent(networkView);
assertEquals(networkView, ev3.getSource());
}
Aggregations