@Override
public int getPort() {
return 42242;
}
});
ServerStartStopViewActionDelegate delegate = new ServerStartStopViewActionDelegate(icons, serverController);
Action action = new Action() {};
delegate.run(action);
assertEquals("Stop Server", action.getText());
assertFalse("Start icon not called", startServerIconCalled);
assertTrue("Stop icon called", stopServerIconCalled);
delegate.run(action);
assertTrue("Start icon called", startServerIconCalled);
assertFalse("Stop icon not called", stopServerIconCalled);
assertEquals("Start Server", action.getText());
}