예제 #1
0
  @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());
  }
예제 #2
0
 @Test
 public void shouldReturnEmptyNickname() {
   IrcMessage aMessage = new IrcMessage(StaticMessages.ping);
   assertEquals("", aMessage.getNickname());
 }