コード例 #1
0
 @Test
 public void test_unsupported() {
   try {
     factory.build(-1);
     fail();
   } catch (UnsupportedOperationException err) {
     assertEquals("Unsupported form field type", err.getMessage());
   }
 }
コード例 #2
0
 @Test
 public void test() {
   assertTrue(factory.build(AcroFields.FIELD_TYPE_TEXT) instanceof TextField);
   assertTrue(factory.build(AcroFields.FIELD_TYPE_CHECKBOX) instanceof CheckboxField);
 }