summaryrefslogtreecommitdiffstats
path: root/test/com
diff options
context:
space:
mode:
authorMili Verma <mili.verma@isode.com>2012-01-10 15:55:29 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-01-11 13:44:37 (GMT)
commitbe94e872d9423501c688c84c6cb945a420a5cb18 (patch)
tree77986e9e30282b526c0246bb6344c175b54ffb5f /test/com
parentc9ff80a46b13b7d1987bf54cae87738a9baf552b (diff)
downloadstroke-be94e872d9423501c688c84c6cb945a420a5cb18.zip
stroke-be94e872d9423501c688c84c6cb945a420a5cb18.tar.bz2
Update review comment related stuff
This patch addresses some review comments: 1. Updates the Javadoc. 2. Disallows arguments from being null - throws NullPointerException. 3. Updates each test to use its own DummyEventLoop. Test-information: Unit tests pass.
Diffstat (limited to 'test/com')
-rw-r--r--test/com/isode/stroke/parser/payloadparsers/CommandParserTest.java4
-rw-r--r--test/com/isode/stroke/parser/payloadparsers/FormParserTest.java4
2 files changed, 2 insertions, 6 deletions
diff --git a/test/com/isode/stroke/parser/payloadparsers/CommandParserTest.java b/test/com/isode/stroke/parser/payloadparsers/CommandParserTest.java
index 4c9854b..53dc0b3 100644
--- a/test/com/isode/stroke/parser/payloadparsers/CommandParserTest.java
+++ b/test/com/isode/stroke/parser/payloadparsers/CommandParserTest.java
@@ -27,14 +27,12 @@ import com.isode.stroke.elements.Command.Note.Type;
import com.isode.stroke.eventloop.DummyEventLoop;
public class CommandParserTest {
- private static DummyEventLoop eventLoop;
-
@BeforeClass
public static void init() throws Exception {
- eventLoop = new DummyEventLoop();
}
private static Command parse(String xmlString) {
+ DummyEventLoop eventLoop = new DummyEventLoop();
PayloadsParserTester parser = new PayloadsParserTester(eventLoop);
assertTrue(parser.parse(xmlString));
diff --git a/test/com/isode/stroke/parser/payloadparsers/FormParserTest.java b/test/com/isode/stroke/parser/payloadparsers/FormParserTest.java
index b57e7d8..5dace99 100644
--- a/test/com/isode/stroke/parser/payloadparsers/FormParserTest.java
+++ b/test/com/isode/stroke/parser/payloadparsers/FormParserTest.java
@@ -30,14 +30,12 @@ import com.isode.stroke.eventloop.DummyEventLoop;
import com.isode.stroke.jid.JID;
public class FormParserTest {
- private static DummyEventLoop eventLoop;
-
@BeforeClass
public static void init() throws Exception {
- eventLoop = new DummyEventLoop();
}
private static Form parse(String xmlString) {
+ DummyEventLoop eventLoop = new DummyEventLoop();
PayloadsParserTester parser = new PayloadsParserTester(eventLoop);
assertTrue(parser.parse(xmlString));