< prev index next >

test/javax/xml/jaxp/unittest/parsers/Bug5010072.java

Print this page




  60             System.err.println("Fatal Error: " + e);
  61             errorCounter++;
  62         }
  63     }
  64 
  65     @Test
  66     public void test1() throws Exception {
  67         SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
  68 
  69         ErrorHandler errorHandler = new ErrorHandler();
  70         schemaFactory.setErrorHandler(errorHandler);
  71 
  72         try {
  73             schemaFactory.newSchema(Bug5010072.class.getResource("Bug5010072.xsd"));
  74             Assert.fail("should fail to compile");
  75         } catch (SAXException e) {
  76             ; // as expected
  77         }
  78     }
  79 }
  80 


  60             System.err.println("Fatal Error: " + e);
  61             errorCounter++;
  62         }
  63     }
  64 
  65     @Test
  66     public void test1() throws Exception {
  67         SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
  68 
  69         ErrorHandler errorHandler = new ErrorHandler();
  70         schemaFactory.setErrorHandler(errorHandler);
  71 
  72         try {
  73             schemaFactory.newSchema(Bug5010072.class.getResource("Bug5010072.xsd"));
  74             Assert.fail("should fail to compile");
  75         } catch (SAXException e) {
  76             ; // as expected
  77         }
  78     }
  79 }

< prev index next >