< prev index next >

test/javax/xml/jaxp/unittest/validation/tck/Bug6943252Test.java

Print this page




  52     public void test() {
  53 
  54         String dir = Bug6943252Test.class.getResource("Bug6943252In").getPath();
  55         File inputs = new File(dir);
  56         File[] files = inputs.listFiles();
  57         SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  58         for (int i = 0; i < files.length; i++) {
  59             try {
  60                 Schema schema = schemaFactory.newSchema(new StreamSource(files[i]));
  61                 Assert.fail(files[i].getName() + "should fail");
  62             } catch (SAXException e) {
  63                 // expected
  64                 System.out.println(files[i].getName() + ":");
  65                 System.out.println(e.getMessage());
  66             }
  67         }
  68 
  69     }
  70 
  71 }
  72 


  52     public void test() {
  53 
  54         String dir = Bug6943252Test.class.getResource("Bug6943252In").getPath();
  55         File inputs = new File(dir);
  56         File[] files = inputs.listFiles();
  57         SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  58         for (int i = 0; i < files.length; i++) {
  59             try {
  60                 Schema schema = schemaFactory.newSchema(new StreamSource(files[i]));
  61                 Assert.fail(files[i].getName() + "should fail");
  62             } catch (SAXException e) {
  63                 // expected
  64                 System.out.println(files[i].getName() + ":");
  65                 System.out.println(e.getMessage());
  66             }
  67         }
  68 
  69     }
  70 
  71 }

< prev index next >