< prev index next >

test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java

Print this page




  72 
  73     @Test
  74     public void testSAXResult1() {
  75         DefaultHandler handler = new DefaultHandler();
  76 
  77         try {
  78             SAXResult saxResult = new SAXResult(handler);
  79             XMLOutputFactory ofac = XMLOutputFactory.newInstance();
  80             XMLEventWriter writer = ofac.createXMLEventWriter(saxResult);
  81         } catch (Exception e) {
  82             if (e instanceof UnsupportedOperationException) {
  83                 // expected
  84             } else {
  85                 e.printStackTrace();
  86                 Assert.fail(e.toString());
  87             }
  88         }
  89     }
  90 
  91 }
  92 


  72 
  73     @Test
  74     public void testSAXResult1() {
  75         DefaultHandler handler = new DefaultHandler();
  76 
  77         try {
  78             SAXResult saxResult = new SAXResult(handler);
  79             XMLOutputFactory ofac = XMLOutputFactory.newInstance();
  80             XMLEventWriter writer = ofac.createXMLEventWriter(saxResult);
  81         } catch (Exception e) {
  82             if (e instanceof UnsupportedOperationException) {
  83                 // expected
  84             } else {
  85                 e.printStackTrace();
  86                 Assert.fail(e.toString());
  87             }
  88         }
  89     }
  90 
  91 }

< prev index next >