From 5e5bdf5c590849fb82d441e3cdeb15cab9eb4762 Mon Sep 17 00:00:00 2001 From: Danny van Heumen Date: Thu, 14 Aug 2014 20:45:34 +0200 Subject: Add test with rare prefix to ensure that it stays useable. --- .../impl/protocol/irc/ChatRoomIrcImplTest.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test') 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 a10c030..6462df4 100644 --- a/test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java +++ b/test/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImplTest.java @@ -25,7 +25,7 @@ public class ChatRoomIrcImplTest this.stackMock = EasyMock.createMock(IrcStack.class); EasyMock.expect(this.providerMock.getIrcStack()).andReturn(stackMock); EasyMock.expect(this.stackMock.getChannelTypes()).andReturn( - Collections.unmodifiableSet(Sets.newHashSet('#', '$'))); + Collections.unmodifiableSet(Sets.newHashSet('#', '&'))); } //@Test @@ -425,4 +425,19 @@ public class ChatRoomIrcImplTest { } } + + /** + * Test creating chat room with alternative prefix. Special check to ensure + * that we don't forget about less often used prefixes. + */ + // @Test + public void testChatRoomWithAlternativePrefix() + { + EasyMock.replay(this.providerMock, this.stackMock); + ChatRoomIrcImpl alternative = + new ChatRoomIrcImpl("&MyAlternative-channel-prefix", + this.providerMock); + Assert.assertEquals("&MyAlternative-channel-prefix", + alternative.getIdentifier()); + } } -- cgit v1.1