summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Clayton <alex.clayton@isode.com>2016-03-16 10:48:22 (GMT)
committerAlex Clayton <alex.clayton@isode.com>2016-03-16 10:54:54 (GMT)
commit892af8539f2b46e840d7344489529259d1df03b9 (patch)
tree78fed06774602915dc2335990bff7777d3e9bda5
parenta452bc6ceed519cba43328f0d741af9723197a24 (diff)
downloadstroke-892af8539f2b46e840d7344489529259d1df03b9.zip
stroke-892af8539f2b46e840d7344489529259d1df03b9.tar.bz2
Add JID.isValid() checks to the JIDTest unit tests.
As per swiften patch 'Add more tests for JID validity' (59c64a11e0bceca4876ba69ef2f30519629b108c). Test-information: All unit tests pass. Change-Id: Iefb77fa089afd13c0f8b5f51f2a3115001a061e8
-rw-r--r--test/com/isode/stroke/jid/JIDTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/com/isode/stroke/jid/JIDTest.java b/test/com/isode/stroke/jid/JIDTest.java
index 9a7b16a..96de429 100644
--- a/test/com/isode/stroke/jid/JIDTest.java
+++ b/test/com/isode/stroke/jid/JIDTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -33,6 +33,7 @@ public class JIDTest {
assertEquals("bar", testling.getDomain());
assertEquals("baz", testling.getResource());
assertFalse(testling.isBare());
+ assertTrue(testling.isValid());
}
@@ -44,6 +45,7 @@ public class JIDTest {
assertEquals("bar", testling.getDomain());
assertEquals("", testling.getResource());
assertTrue(testling.isBare());
+ assertTrue(testling.isValid());
}
@@ -64,6 +66,7 @@ public class JIDTest {
assertEquals("bar", testling.getDomain());
assertEquals("baz", testling.getResource());
assertFalse(testling.isBare());
+ assertTrue(testling.isValid());
}
@@ -75,6 +78,7 @@ public class JIDTest {
assertEquals("bar", testling.getDomain());
assertEquals("", testling.getResource());
assertTrue(testling.isBare());
+ assertTrue(testling.isValid());
}
@@ -98,6 +102,7 @@ public class JIDTest {
JID testling = new JID("FoΩ");
assertEquals("foω", testling.getDomain());
+ assertTrue(testling.isValid());
}
@@ -106,6 +111,7 @@ public class JIDTest {
JID testling = new JID("bar/FoΩ");
assertEquals(testling.getResource(), "FoΩ");
+ assertTrue(testling.isValid());
}
@@ -139,6 +145,7 @@ public class JIDTest {
assertEquals("foo", testling.getNode());
assertEquals("bar", testling.getDomain());
assertEquals("baz", testling.getResource());
+ assertTrue(testling.isValid());
}
@@ -179,6 +186,7 @@ public class JIDTest {
assertEquals("", testling.toBare().getNode());
assertEquals("bar", testling.toBare().getDomain());
assertTrue(testling.toBare().isBare());
+ assertTrue(testling.isValid());
}