예제 #1
0
 public void testOptionTagNotNestedWithinSelectTag() throws Exception {
   try {
     tag.setParent(null);
     tag.setValue("foo");
     tag.doStartTag();
     fail("Must throw an IllegalStateException when not nested within a <select/> tag.");
   } catch (IllegalStateException ex) {
     // expected
   }
 }
예제 #2
0
 public void testWithoutContext() throws Exception {
   this.tag.setParent(null);
   this.tag.setValue("foo");
   this.tag.setLabel("Foo");
   try {
     tag.doStartTag();
     fail("Must not be able to use <option> tag without exposed context.");
   } catch (IllegalStateException ex) {
     // expected
   }
 }