File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
main/java/org/metafacture/biblio/iso2709
test/java/org/metafacture/biblio/iso2709 Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public void setSystemChars(final char[] systemChars) {
122
122
}
123
123
124
124
public void setSystemChar (final int index , final char value ) {
125
- Require .that (0 <= index && index < IMPL_CODES_LENGTH );
125
+ Require .that (0 <= index && index < SYSTEM_CHARS_LENGTH );
126
126
Require .that (value < Iso646Constants .MAX_CHAR_CODE );
127
127
label .setSystemChar (index , value );
128
128
}
Original file line number Diff line number Diff line change @@ -183,6 +183,11 @@ public void shouldThrowExceptionIfSystemCharsIsNull() {
183
183
builder .setSystemChars (null ); // Exception expected
184
184
}
185
185
186
+ @ Test (expected = IllegalArgumentException .class )
187
+ public void shouldThrowExceptionIfSystemCharIndexGreaterThan2 () {
188
+ builder .setSystemChar (3 , '1' );
189
+ }
190
+
186
191
@ Test
187
192
public void shouldWriteReserverdCharToRecordLabel () {
188
193
builder .setReservedChar ('R' );
You can’t perform that action at this time.
0 commit comments