Beispiel #1
0
 @Test
 public void testSetValueBadCurrencyCode() {
   try {
     iSOAmount.setValue("X23456789012");
     fail("expected exception");
   } catch (ISOException e) {
     assertThat(e.getMessage(), is("For input string: \"X23\""));
   }
 }
Beispiel #2
0
 @Test
 public void testSetValueBadLength() {
   try {
     iSOAmount.setValue("1234");
     fail("expected invalid length ISOException");
   } catch (ISOException e) {
     assertThat(e.getMessage(), is("ISOAmount invalid length 4"));
   }
 }