aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/net/java/sip/communicator/impl/protocol/irc/MessageIrcImplTest.java14
-rw-r--r--test/net/java/sip/communicator/impl/protocol/irc/UtilsTest.java8
2 files changed, 4 insertions, 18 deletions
diff --git a/test/net/java/sip/communicator/impl/protocol/irc/MessageIrcImplTest.java b/test/net/java/sip/communicator/impl/protocol/irc/MessageIrcImplTest.java
index 02eabd2..e79030b 100644
--- a/test/net/java/sip/communicator/impl/protocol/irc/MessageIrcImplTest.java
+++ b/test/net/java/sip/communicator/impl/protocol/irc/MessageIrcImplTest.java
@@ -68,13 +68,9 @@ public class MessageIrcImplTest
// Test with chat room member.
ChatRoomMemberIrcImpl chatRoomMember =
EasyMock.createMock(ChatRoomMemberIrcImpl.class);
- EasyMock.expect(chatRoomMember.getContactAddress())
- .andReturn("IamUser");
EasyMock.replay(chatRoomMember);
- MessageIrcImpl message =
- MessageIrcImpl.newActionFromIRC(chatRoomMember, text);
- Assert.assertEquals(Utils.styleAsAction(text, "IamUser"),
- message.getContent());
+ MessageIrcImpl message = MessageIrcImpl.newActionFromIRC(text);
+ Assert.assertEquals("/me Hello world.", message.getContent());
Assert.assertEquals(MessageIrcImpl.HTML_MIME_TYPE,
message.getContentType());
Assert.assertEquals(MessageIrcImpl.DEFAULT_MIME_ENCODING,
@@ -83,11 +79,9 @@ public class MessageIrcImplTest
// Test with contact.
ContactIrcImpl contact = EasyMock.createMock(ContactIrcImpl.class);
- EasyMock.expect(contact.getAddress()).andReturn("IamUser");
EasyMock.replay(contact);
- message = MessageIrcImpl.newActionFromIRC(contact, text);
- Assert.assertEquals(Utils.styleAsAction(text, "IamUser"),
- message.getContent());
+ message = MessageIrcImpl.newActionFromIRC(text);
+ Assert.assertEquals("/me Hello world.", message.getContent());
Assert.assertEquals(MessageIrcImpl.HTML_MIME_TYPE,
message.getContentType());
Assert.assertEquals(MessageIrcImpl.DEFAULT_MIME_ENCODING,
diff --git a/test/net/java/sip/communicator/impl/protocol/irc/UtilsTest.java b/test/net/java/sip/communicator/impl/protocol/irc/UtilsTest.java
index 92b6ed8..430eb94 100644
--- a/test/net/java/sip/communicator/impl/protocol/irc/UtilsTest.java
+++ b/test/net/java/sip/communicator/impl/protocol/irc/UtilsTest.java
@@ -194,12 +194,4 @@ public class UtilsTest
Assert.assertEquals("<i>MrNiceGuy</i>: hello world",
Utils.styleAsNotice(message, nick));
}
-
- public void testStyleAsAction()
- {
- String message = "is absolutely crazy!";
- String nick = "AbsoluteLunatic";
- Assert.assertEquals("<b>*AbsoluteLunatic</b> is absolutely crazy!",
- Utils.styleAsAction(message, nick));
- }
}