diff options
author | Vitaly Takmazov | 2015-11-04 13:40:17 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2015-11-04 13:40:39 +0300 |
commit | c98f2e946babbec6b0174e175f49e9cd353223e2 (patch) | |
tree | 078dc94fe8370f3516aeba96c90d1a36097460a5 /src/test/java/com | |
parent | a5766d12d6dbd80a44d6d1deee4d454016b37079 (diff) |
add unit tests
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/juick/tests/MessageTests.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/com/juick/tests/MessageTests.java b/src/test/java/com/juick/tests/MessageTests.java new file mode 100644 index 00000000..47b2d13c --- /dev/null +++ b/src/test/java/com/juick/tests/MessageTests.java @@ -0,0 +1,16 @@ +import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.juick.Message;
+
+public class MessageTests {
+ @Test
+ public void messageTagsParser() {
+ Message msg = new Message();
+ msg.parseTags("test test" + (char)0xA0 + "2 test3");
+ assertEquals("First tag must be", "test", msg.Tags.get(0));
+ assertEquals("Third tag must be", "test3", msg.Tags.get(2));
+ assertEquals("Count of tags must be", 3, msg.Tags.size());
+ }
+}
\ No newline at end of file |