aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDanny van Heumen <danny@dannyvanheumen.nl>2014-11-12 23:48:46 +0100
committerDanny van Heumen <danny@dannyvanheumen.nl>2014-11-12 23:48:46 +0100
commit143d2a01f45f5e82a7c329b6361da205f92f6c87 (patch)
tree7e98a2ef66af4373adf59149dd997bc14a56ea3a /test
parent3aad682f9b6eb690da725b0f1234869455ca7af3 (diff)
downloadjitsi-143d2a01f45f5e82a7c329b6361da205f92f6c87.zip
jitsi-143d2a01f45f5e82a7c329b6361da205f92f6c87.tar.gz
jitsi-143d2a01f45f5e82a7c329b6361da205f92f6c87.tar.bz2
Use Jitsi /me display support instead of IRC formatting it itself.
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));
- }
}