@Test public void shouldReturnNickname() { IrcMessage aMessage = new IrcMessage(StaticMessages.join); assertEquals("irclib", aMessage.getNickname()); aMessage = new IrcMessage(StaticMessages.messageWithoutIdent); assertEquals("irclib", aMessage.getNickname()); aMessage = new IrcMessage(StaticMessages.messageWithoutIdentAndHost); assertEquals("irclib", aMessage.getNickname()); }
@Test public void shouldReturnEmptyNickname() { IrcMessage aMessage = new IrcMessage(StaticMessages.ping); assertEquals("", aMessage.getNickname()); }