File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
metafacture-biblio/src/test/java/org/metafacture/biblio/marc21 Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616package org .metafacture .biblio .marc21 ;
1717
18+ import static org .metafacture .biblio .marc21 .Marc21EventNames .LEADER_ENTITY ;
19+ import static org .metafacture .biblio .marc21 .Marc21EventNames .RECORD_STATUS_LITERAL ;
1820import static org .mockito .ArgumentMatchers .any ;
1921import static org .mockito .ArgumentMatchers .matches ;
2022import static org .mockito .Mockito .verify ;
3537 */
3638public final class Marc21EncoderTest {
3739
38- private static final String LEADER_LITERAL = "leader" ;
39-
4040 private Marc21Encoder marc21Encoder ;
4141
4242 @ Mock
@@ -102,4 +102,15 @@ public void issue231ShouldIgnoreTypeLiterals() {
102102 verify (receiver ).process (any (String .class ));
103103 }
104104
105+ @ Test
106+ public void issue278ShouldNotFailWhenProcessingLeaderEntity () {
107+ marc21Encoder .startRecord ("" );
108+ marc21Encoder .startEntity (LEADER_ENTITY );
109+ marc21Encoder .literal (RECORD_STATUS_LITERAL , "a" );
110+ marc21Encoder .endEntity ();
111+ marc21Encoder .endRecord ();
112+
113+ verify (receiver ).process (any (String .class ));
114+ }
115+
105116}
You can’t perform that action at this time.
0 commit comments