Repository: johnzon
Updated Branches:
  refs/heads/master ecbbe0631 -> 1799768f6


JOHNZON-157 test for showing broken readObject


Project: http://git-wip-us.apache.org/repos/asf/johnzon/repo
Commit: http://git-wip-us.apache.org/repos/asf/johnzon/commit/cadcefb2
Tree: http://git-wip-us.apache.org/repos/asf/johnzon/tree/cadcefb2
Diff: http://git-wip-us.apache.org/repos/asf/johnzon/diff/cadcefb2

Branch: refs/heads/master
Commit: cadcefb28a4c02a35c2957b6d1afa876fcaf991d
Parents: ecbbe06
Author: Mark Struberg <strub...@apache.org>
Authored: Mon Feb 12 10:23:52 2018 +0100
Committer: Mark Struberg <strub...@apache.org>
Committed: Mon Feb 12 10:23:52 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/johnzon/core/JsonParserTest.java     | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/johnzon/blob/cadcefb2/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java
----------------------------------------------------------------------
diff --git 
a/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java 
b/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java
index 0a6e975..9231853 100644
--- a/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java
+++ b/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java
@@ -26,6 +26,8 @@ import static org.junit.Assert.fail;
 
 import java.io.ByteArrayInputStream;
 import java.io.CharArrayReader;
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
@@ -46,6 +48,7 @@ import javax.json.stream.JsonParser;
 import javax.json.stream.JsonParser.Event;
 import javax.json.stream.JsonParsingException;
 
+import org.junit.Assert;
 import org.junit.Test;
 
 public class JsonParserTest {
@@ -64,6 +67,14 @@ public class JsonParserTest {
         }
     }
 
+    @Test
+    public void testParseGetObject() throws Exception {
+        String json = "{\"a\":1,\"b\":2 }";
+        JsonParser parser = Json.createParser(new StringReader(json));
+        JsonObject jsonObject = parser.getObject();
+        Assert.assertNotNull(jsonObject);
+    }
+
     private void assertSimple(final JsonParser parser) {
         {
             assertTrue(parser.hasNext());

Reply via email to