Skip to content

Commit 88d941f

Browse files
committed
Add test case for unsupported root array without recordPath (#382)
1 parent 7b978b6 commit 88d941f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

metafacture-json/src/test/java/org/metafacture/json/JsonDecoderTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ public void testShouldProcessRecordsInArrayRoot() {
183183
ordered.verify(receiver).endRecord();
184184
}
185185

186+
@Test(expected=MetafactureException.class)
187+
public void testRootArrayNoRecordPath() {
188+
jsonDecoder.process(
189+
"[" + "{\"lit\": \"record 1\"}," +
190+
"{\"lit\": \"record 2\"}" + "]");
191+
}
192+
186193
@Test
187194
public void testShouldProcessMultipleRecords() {
188195
jsonDecoder.process("{\"lit\": \"record 1\"}");

0 commit comments

Comments
 (0)