Fixed some (outdated) unit tests for IRC command implementations.

I forgot to update the unit tests during the last changes to IRC command
implementations.
cefexperiments
Danny van Heumen 11 years ago
parent 07f1d09f9e
commit 3edf1138a7

@ -46,7 +46,14 @@ public void testEmptyJoin()
EasyMock.replay(connection);
Join join = new Join(null, connection);
join.execute("#test", "/join");
try
{
join.execute("#test", "/join");
Assert.fail();
}
catch (IllegalArgumentException e)
{
}
}
public void testJoinEmptyChannelNoPassword()

@ -46,7 +46,14 @@ public void testNoMessage()
EasyMock.replay(provider, connection);
Me me = new Me(provider, connection);
me.execute("#test", "/me");
try
{
me.execute("#test", "/me");
Assert.fail();
}
catch (IllegalArgumentException e)
{
}
}
public void testZeroLengthMessage()

@ -47,7 +47,14 @@ public void testEmptyCommand()
EasyMock.replay(connection);
Mode mode = new Mode(null, connection);
mode.execute("#test", "/mode");
try
{
mode.execute("#test", "/mode");
Assert.fail();
}
catch (IllegalArgumentException e)
{
}
}
public void testEmptyModeLine()
@ -56,7 +63,13 @@ public void testEmptyModeLine()
EasyMock.replay(connection);
Mode mode = new Mode(null, connection);
mode.execute("#test", "/mode ");
try
{
mode.execute("#test", "/mode ");
}
catch (IllegalArgumentException e)
{
}
}
public void testSpacesModeLine()

@ -49,7 +49,15 @@ public void testMessageNoNickNoMsg()
EasyMock.replay(provider, connection);
Msg msg = new Msg(provider, connection);
msg.execute("#test", "/msg");
try
{
msg.execute("#test", "/msg");
Assert
.fail("Should have thrown IAE for missing target and message.");
}
catch (IllegalArgumentException e)
{
}
}
public void testMessageZeroLengthMsg()

@ -57,7 +57,14 @@ public void testEmptyNickCommand()
EasyMock.replay(provider, connection);
Nick nick = new Nick(provider, connection);
nick.execute("#test", "/nick");
try
{
nick.execute("#test", "/nick");
Assert.fail();
}
catch (IllegalArgumentException e)
{
}
}
public void testEmptyNickCommandWithSpace()
@ -68,7 +75,14 @@ public void testEmptyNickCommandWithSpace()
EasyMock.replay(provider, connection);
Nick nick = new Nick(provider, connection);
nick.execute("#test", "/nick ");
try
{
nick.execute("#test", "/nick ");
Assert.fail();
}
catch (IllegalArgumentException e)
{
}
}
public void testEmptyNickCommandWithDoubleSpace()

Loading…
Cancel
Save