aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/java
diff options
context:
space:
mode:
authorDanny van Heumen <danny@dannyvanheumen.nl>2014-08-11 19:49:49 +0200
committerDanny van Heumen <danny@dannyvanheumen.nl>2014-08-11 19:49:49 +0200
commit4f0e2d6ff7c98759d8ea72afdb85a240f62ba40a (patch)
tree8cc4b472541a26a1f131adce5057a2b4a1772984 /test/net/java
parent192b744196f40e4292ee3ffb509b8f00fc7bcd53 (diff)
downloadjitsi-4f0e2d6ff7c98759d8ea72afdb85a240f62ba40a.zip
jitsi-4f0e2d6ff7c98759d8ea72afdb85a240f62ba40a.tar.gz
jitsi-4f0e2d6ff7c98759d8ea72afdb85a240f62ba40a.tar.bz2
Fixed remaining failing cases to work with JUnit 3.
Diffstat (limited to 'test/net/java')
-rw-r--r--test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java54
1 files changed, 48 insertions, 6 deletions
diff --git a/test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java b/test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java
index 077e5a4..c745a98 100644
--- a/test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java
+++ b/test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java
@@ -37,42 +37,84 @@ public class ChatRoomIrcImplTest
public void testConstructionNullIdentifier()
{
EasyMock.replay(this.providerMock, this.stackMock);
- new ChatRoomIrcImpl(null, this.providerMock);
+ try
+ {
+ new ChatRoomIrcImpl(null, this.providerMock);
+ fail("Should have failed with IAE.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
//@Test(expected = IllegalArgumentException.class)
public void testConstructionNullProvider()
{
EasyMock.replay(this.providerMock, this.stackMock);
- new ChatRoomIrcImpl("#test", null);
+ try
+ {
+ new ChatRoomIrcImpl("#test", null);
+ fail("Should have failed with IAE.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
//@Test(expected = IllegalArgumentException.class)
public void testEmptyName()
{
EasyMock.replay(this.providerMock, this.stackMock);
- new ChatRoomIrcImpl("", this.providerMock);
+ try
+ {
+ new ChatRoomIrcImpl("", this.providerMock);
+ fail("Should have failed with IAE.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
//@Test(expected = IllegalArgumentException.class)
public void testIllegalNameBadPrefix()
{
EasyMock.replay(this.providerMock, this.stackMock);
- new ChatRoomIrcImpl("!test", this.providerMock);
+ try
+ {
+ new ChatRoomIrcImpl("!test", this.providerMock);
+ fail("Should have failed with IAE.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
//@Test(expected = IllegalArgumentException.class)
public void testIllegalNameSpace()
{
EasyMock.replay(this.providerMock, this.stackMock);
- new ChatRoomIrcImpl("#test test", this.providerMock);
+ try
+ {
+ new ChatRoomIrcImpl("#test test", this.providerMock);
+ fail("Should have failed with IAE.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
//@Test(expected = IllegalArgumentException.class)
public void testIllegalNameComma()
{
EasyMock.replay(this.providerMock, this.stackMock);
- new ChatRoomIrcImpl("#test,test", this.providerMock);
+ try
+ {
+ new ChatRoomIrcImpl("#test,test", this.providerMock);
+ fail("Should have failed with IAE.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
//@Test