File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/test/java/org/culturegraph/mf/stream/converter/bib Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,39 @@ public void testShouldFixIncompleteRecordIfConfigured() {
300
300
verify028AEnd (ordered );
301
301
ordered .verify (receiver ).endRecord ();
302
302
}
303
+
304
+
305
+ @ Test (expected =FormatException .class )
306
+ public void testShouldFailIfRecordEndsWithSubfieldIndicatorByDefault () {
307
+ picaDecoder .process (
308
+ FIELD_001AT +
309
+ FIELD_003AT +
310
+ FIELD_028A_START +
311
+ SUBFIELD_A +
312
+ EMPTY_SUBFIELD );
313
+ }
303
314
315
+ @ Test
316
+ public void testShouldFixRecordEndingWithSubfieldIndicatorIfConfigured () {
317
+ picaDecoder .setFixUnexpectedEOR (true );
318
+
319
+ picaDecoder .process (
320
+ FIELD_001AT +
321
+ FIELD_003AT +
322
+ FIELD_028A_START +
323
+ SUBFIELD_A +
324
+ EMPTY_SUBFIELD );
325
+
326
+ final InOrder ordered = inOrder (receiver );
327
+ ordered .verify (receiver ).startRecord (RECORD_ID );
328
+ verify001At (ordered );
329
+ verify003At (ordered );
330
+ verify028AStart (ordered );
331
+ verifySubfieldA (ordered );
332
+ verify028AEnd (ordered );
333
+ ordered .verify (receiver ).endRecord ();
334
+ }
335
+
304
336
@ Test
305
337
public void testShouldNotNormalizeUTF8ByDefault () {
306
338
picaDecoder .process (
You can’t perform that action at this time.
0 commit comments