< prev index next >

test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java

Print this page




  85      * Encoding is not specified. getInputEncoding returns null..
  86      */
  87     @Test
  88     public void testGetInputEncoding002() {
  89         Document doc = null;
  90         try {
  91             DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
  92             doc = db.newDocument();
  93         } catch (ParserConfigurationException e) {
  94             Assert.fail(e.toString());
  95         }
  96 
  97         String encoding = doc.getInputEncoding();
  98         if (encoding != null) {
  99             Assert.fail("expected encoding: null, returned: " + encoding);
 100         }
 101 
 102         System.out.println("OK");
 103     }
 104 }
 105 


  85      * Encoding is not specified. getInputEncoding returns null..
  86      */
  87     @Test
  88     public void testGetInputEncoding002() {
  89         Document doc = null;
  90         try {
  91             DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
  92             doc = db.newDocument();
  93         } catch (ParserConfigurationException e) {
  94             Assert.fail(e.toString());
  95         }
  96 
  97         String encoding = doc.getInputEncoding();
  98         if (encoding != null) {
  99             Assert.fail("expected encoding: null, returned: " + encoding);
 100         }
 101 
 102         System.out.println("OK");
 103     }
 104 }

< prev index next >