jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DBFNamespaceTest.java
changeset 40223 64662417aa2d
parent 28445 5a87f52ca380
child 40829 ad509d5baa06
equal deleted inserted replaced
40222:ec0a4bdb7a07 40223:64662417aa2d
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 package javax.xml.parsers.ptests;
    24 package javax.xml.parsers.ptests;
    25 
    25 
       
    26 import static javax.xml.parsers.ptests.ParserTestConst.GOLDEN_DIR;
       
    27 import static javax.xml.parsers.ptests.ParserTestConst.XML_DIR;
    26 import static jaxp.library.JAXPTestUtilities.USER_DIR;
    28 import static jaxp.library.JAXPTestUtilities.USER_DIR;
    27 import static jaxp.library.JAXPTestUtilities.compareWithGold;
    29 import static jaxp.library.JAXPTestUtilities.compareWithGold;
    28 import static org.testng.Assert.assertTrue;
    30 import static org.testng.Assert.assertTrue;
       
    31 
    29 import java.io.File;
    32 import java.io.File;
       
    33 
    30 import javax.xml.parsers.DocumentBuilderFactory;
    34 import javax.xml.parsers.DocumentBuilderFactory;
    31 import static javax.xml.parsers.ptests.ParserTestConst.GOLDEN_DIR;
       
    32 import static javax.xml.parsers.ptests.ParserTestConst.XML_DIR;
       
    33 import javax.xml.transform.TransformerFactory;
    35 import javax.xml.transform.TransformerFactory;
    34 import javax.xml.transform.dom.DOMSource;
    36 import javax.xml.transform.dom.DOMSource;
    35 import javax.xml.transform.sax.SAXResult;
    37 import javax.xml.transform.sax.SAXResult;
    36 import jaxp.library.JAXPFileBaseTest;
    38 
    37 import org.testng.annotations.DataProvider;
    39 import org.testng.annotations.DataProvider;
       
    40 import org.testng.annotations.Listeners;
    38 import org.testng.annotations.Test;
    41 import org.testng.annotations.Test;
    39 import org.w3c.dom.Document;
    42 import org.w3c.dom.Document;
    40 
    43 
    41 /**
    44 /**
    42  * This tests DocumentBuilderFactory for namespace processing and no-namespace
    45  * This tests DocumentBuilderFactory for namespace processing and no-namespace
    43  * processing.
    46  * processing.
    44  */
    47  */
    45 public class DBFNamespaceTest extends JAXPFileBaseTest {
    48 /*
       
    49  * @test
       
    50  * @library /javax/xml/jaxp/libs
       
    51  * @run testng/othervm -DrunSecMngr=true javax.xml.parsers.ptests.DBFNamespaceTest
       
    52  * @run testng/othervm javax.xml.parsers.ptests.DBFNamespaceTest
       
    53  */
       
    54 @Listeners({jaxp.library.FilePolicy.class})
       
    55 public class DBFNamespaceTest {
    46 
    56 
    47     /**
    57     /**
    48      * Provide input for the cases that supporting namespace or not.
    58      * Provide input for the cases that supporting namespace or not.
    49      * @return a two-dimensional array contains factory, output file name and
    59      * @return a two-dimensional array contains factory, output file name and
    50      *         golden validate file name.
    60      *         golden validate file name.
    93             TransformerFactory.newInstance().newTransformer().
   103             TransformerFactory.newInstance().newTransformer().
    94                 transform(domSource, new SAXResult(chandler));
   104                 transform(domSource, new SAXResult(chandler));
    95         }
   105         }
    96     }
   106     }
    97 }
   107 }
       
   108 
       
   109