< prev index next >

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

Print this page




  66             w.writeStartElement("ns1", "foo", "http://example.com/");
  67             w.writeNamespace("ns1", "http://example.com/");
  68             w.writeNamespace("ns1", "http://example.com/");
  69             w.writeEndElement();
  70             w.writeEndDocument();
  71             w.close();
  72         } catch (XMLStreamException xmlStreamException) {
  73             xmlStreamException.printStackTrace();
  74             Assert.fail(xmlStreamException.toString());
  75         }
  76 
  77         // debugging output for humans
  78         System.out.println();
  79         System.out.println("actual:   \"" + buffer.toString() + "\"");
  80         System.out.println("expected: \"" + EXPECTED_OUTPUT + "\"");
  81 
  82         // are results as expected?
  83         Assert.assertEquals(EXPECTED_OUTPUT, buffer.toString());
  84     }
  85 }
  86 


  66             w.writeStartElement("ns1", "foo", "http://example.com/");
  67             w.writeNamespace("ns1", "http://example.com/");
  68             w.writeNamespace("ns1", "http://example.com/");
  69             w.writeEndElement();
  70             w.writeEndDocument();
  71             w.close();
  72         } catch (XMLStreamException xmlStreamException) {
  73             xmlStreamException.printStackTrace();
  74             Assert.fail(xmlStreamException.toString());
  75         }
  76 
  77         // debugging output for humans
  78         System.out.println();
  79         System.out.println("actual:   \"" + buffer.toString() + "\"");
  80         System.out.println("expected: \"" + EXPECTED_OUTPUT + "\"");
  81 
  82         // are results as expected?
  83         Assert.assertEquals(EXPECTED_OUTPUT, buffer.toString());
  84     }
  85 }

< prev index next >