diff --git a/metafacture-json/src/test/java/org/metafacture/json/JsonDecoderTest.java b/metafacture-json/src/test/java/org/metafacture/json/JsonDecoderTest.java index f99f8876d..8d14bb466 100644 --- a/metafacture-json/src/test/java/org/metafacture/json/JsonDecoderTest.java +++ b/metafacture-json/src/test/java/org/metafacture/json/JsonDecoderTest.java @@ -183,6 +183,13 @@ public void testShouldProcessRecordsInArrayRoot() { ordered.verify(receiver).endRecord(); } + @Test(expected=MetafactureException.class) + public void testRootArrayNoRecordPath() { + jsonDecoder.process( + "[" + "{\"lit\": \"record 1\"}," + + "{\"lit\": \"record 2\"}" + "]"); + } + @Test public void testShouldProcessMultipleRecords() { jsonDecoder.process("{\"lit\": \"record 1\"}");