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