@Test public void checkNickTest() { assertEquals(myNick, profile.getCurrentNickname()); String newNick = auth.checkNick(mockNetwork); assertNull(newNick); profile.setCurrentNickname(myAltNick); when(mockSet.size()).thenReturn(0); newNick = auth.checkNick(mockNetwork); assertNotNull(newNick); assertEquals(myNick, newNick); }
protected String checkNick(Network network) { String primaryNick = network.getProfile().getNickname(); if (!(primaryNick.equals(wand.getMyNick(network)))) { if (network.commonChannels(primaryNick).size() == 0) { return primaryNick; } } return null; }
AuthPlugin implements Plugin { protected String checkNick(Network network) { String primaryNick = network.getProfile().getNickname(); if (!(primaryNick.equals(wand.getMyNick(network)))) { if (network.commonChannels(primaryNick).size() == 0) { return primaryNick; } } return null; } }
AuthPlugin implements Plugin { protected String checkNick(Network network) { String primaryNick = network.getProfile().getNickname(); if (!(primaryNick.equals(wand.getMyNick(network)))) { if (network.commonChannels(primaryNick).size() == 0) { return primaryNick; } } return null; } AuthPlugin(); }
AuthPlugin implements Plugin { protected String checkNick(Network network) { String primaryNick = network.getProfile().getNickname(); if (!(primaryNick.equals(wand.getMyNick(network)))) { if (network.commonChannels(primaryNick).size() == 0) { return primaryNick; } } return null; } AuthPlugin(); String getDescription(); void incomingEvent(Event e); void addEventDistributor(EventDistributor eventDistributor); void addWand(Wand wand); void forceAuth(Network network); }
AuthPlugin implements Plugin { protected String checkNick(Network network) { String primaryNick = network.getProfile().getNickname(); if (!(primaryNick.equals(wand.getMyNick(network)))) { if (network.commonChannels(primaryNick).size() == 0) { return primaryNick; } } return null; } AuthPlugin(); String getDescription(); void incomingEvent(Event e); void addEventDistributor(EventDistributor eventDistributor); void addWand(Wand wand); void forceAuth(Network network);  }