< prev index next >
test/javax/xml/jaxp/functional/test/gaptest/Bug4515660.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 37,70 ****
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.stream.StreamResult;
- import jaxp.library.JAXPBaseTest;
-
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.XMLFilterImpl;
/*
* @bug 4515660
* @summary verify property org.xml.sax.driver is used by SAXTransformerFactory
*/
@Test(singleThreaded = true)
! public class Bug4515660 extends JAXPBaseTest {
@BeforeClass
public void setSaxDrier() {
! setSystemProperty("org.xml.sax.driver", ReaderStub.class.getName());
}
@AfterClass
public void clearSaxDrier() {
! setSystemProperty("org.xml.sax.driver", null);
}
@Test
public void testTransformer() throws TransformerException {
String xml = "<?xml version='1.0'?><root/>";
--- 37,70 ----
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.stream.StreamResult;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
+ import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.XMLFilterImpl;
/*
* @bug 4515660
* @summary verify property org.xml.sax.driver is used by SAXTransformerFactory
*/
@Test(singleThreaded = true)
! @Listeners({jaxp.library.BasePolicy.class})
! public class Bug4515660 {
@BeforeClass
public void setSaxDrier() {
! System.setProperty("org.xml.sax.driver", ReaderStub.class.getName());
}
@AfterClass
public void clearSaxDrier() {
! System.clearProperty("org.xml.sax.driver");
}
@Test
public void testTransformer() throws TransformerException {
String xml = "<?xml version='1.0'?><root/>";
< prev index next >