< prev index next >

test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package common;
  25 
  26 import java.io.StringReader;
  27 import java.io.StringWriter;

  28 import javax.xml.transform.Source;
  29 import javax.xml.transform.Transformer;
  30 import javax.xml.transform.TransformerFactory;
  31 import javax.xml.transform.stream.StreamResult;
  32 import javax.xml.transform.stream.StreamSource;
  33 import org.testng.annotations.Test;
  34 import org.testng.annotations.BeforeClass;


  35 
  36 /*
  37  * @test
  38  * @modules javax.xml/com.sun.org.apache.xerces.internal.jaxp
  39  * @bug 8144593
  40  * @summary Check that warnings about unsupported properties from parsers
  41  * are suppressed during the transformation process.
  42  */

  43 public class TransformationWarningsTest extends WarningsTestBase {
  44 
  45     @BeforeClass
  46     public void setup() {
  47         //Set test SAX driver implementation.
  48         System.setProperty("org.xml.sax.driver", "common.TestSAXDriver");
  49     }
  50 
  51     @Test
  52     public void testTransformation() throws Exception {
  53         startTest();
  54     }
  55 
  56     //One iteration of xml transformation test case. It will be called from each
  57     //TestWorker task defined in WarningsTestBase class.
  58     void doOneTestIteration() throws Exception {
  59         // Prepare output stream
  60         StringWriter xmlResultString = new StringWriter();
  61         StreamResult xmlResultStream = new StreamResult(xmlResultString);
  62         // Prepare xml source stream




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package common;
  25 
  26 import java.io.StringReader;
  27 import java.io.StringWriter;
  28 
  29 import javax.xml.transform.Source;
  30 import javax.xml.transform.Transformer;
  31 import javax.xml.transform.TransformerFactory;
  32 import javax.xml.transform.stream.StreamResult;
  33 import javax.xml.transform.stream.StreamSource;
  34 
  35 import org.testng.annotations.BeforeClass;
  36 import org.testng.annotations.Listeners;
  37 import org.testng.annotations.Test;
  38 
  39 /*
  40  * @test

  41  * @bug 8144593
  42  * @summary Check that warnings about unsupported properties from parsers
  43  * are suppressed during the transformation process.
  44  */
  45 @Listeners({jaxp.library.BasePolicy.class})
  46 public class TransformationWarningsTest extends WarningsTestBase {
  47 
  48     @BeforeClass
  49     public void setup() {
  50         //Set test SAX driver implementation.
  51         System.setProperty("org.xml.sax.driver", "common.TestSAXDriver");
  52     }
  53 
  54     @Test
  55     public void testTransformation() throws Exception {
  56         startTest();
  57     }
  58 
  59     //One iteration of xml transformation test case. It will be called from each
  60     //TestWorker task defined in WarningsTestBase class.
  61     void doOneTestIteration() throws Exception {
  62         // Prepare output stream
  63         StringWriter xmlResultString = new StringWriter();
  64         StreamResult xmlResultStream = new StreamResult(xmlResultString);
  65         // Prepare xml source stream


< prev index next >