diff options
Diffstat (limited to 'test/jrummikub')
-rw-r--r-- | test/jrummikub/control/LoginControlTest.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/jrummikub/control/LoginControlTest.java b/test/jrummikub/control/LoginControlTest.java index 946b143..152d069 100644 --- a/test/jrummikub/control/LoginControlTest.java +++ b/test/jrummikub/control/LoginControlTest.java @@ -1,9 +1,9 @@ package jrummikub.control; import static org.junit.Assert.*; -import jrummikub.control.LoginControl; import jrummikub.util.IListener; -import jrummikub.util.IListener3; +import jrummikub.util.IListener1; +import jrummikub.util.LoginData; import jrummikub.view.MockView; import org.junit.Before; @@ -35,17 +35,17 @@ public class LoginControlTest { @Test public void loginEventTest() { loginControl.getLoginEvent().add( - new IListener3<String, String, String>() { + new IListener1<LoginData>() { @Override - public void handle(String value1, String value2, - String value3) { - assertEquals("a", value1); - assertEquals("b", value2); - assertEquals("c", value3); + public void handle(LoginData loginData) { + assertEquals("a", loginData.getUserName()); + assertEquals("b", loginData.getServerName()); + assertEquals("c", loginData.getPassword()); + assertEquals("d", loginData.getChannelName()); handled = true; } }); - view.loginPanel.loginEvent.emit("a", "b", "c"); + view.loginPanel.loginEvent.emit(new LoginData("a", "b", "c", "d")); assertTrue(handled); assertFalse(view.isLoginPanelVisible); assertFalse(view.isScorePanelVisible); |