20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package stream.EntitiesTest; 25 26 import java.io.IOException; 27 import java.io.InputStreamReader; 28 import java.io.LineNumberReader; 29 import java.io.Reader; 30 import java.io.StringReader; 31 import java.net.URL; 32 33 import javax.xml.stream.XMLInputFactory; 34 import javax.xml.stream.XMLStreamReader; 35 import javax.xml.stream.events.XMLEvent; 36 37 import org.testng.Assert; 38 import org.testng.annotations.AfterMethod; 39 import org.testng.annotations.BeforeMethod; 40 import org.testng.annotations.Test; 41 42 /* 43 * @summary Test StAX parses entity. 44 */ 45 public class EntityTest { 46 47 XMLInputFactory factory = null; 48 String output = ""; 49 50 @BeforeMethod 51 protected void setUp() { 52 try { 53 factory = XMLInputFactory.newInstance(); 54 } catch (Exception ex) { 55 Assert.fail("Could not create XMLInputFactory"); 56 } 57 } 58 59 @AfterMethod 60 protected void tearDown() { 61 factory = null; 62 } 63 64 @Test | 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package stream.EntitiesTest; 25 26 import java.io.IOException; 27 import java.io.InputStreamReader; 28 import java.io.LineNumberReader; 29 import java.io.Reader; 30 import java.io.StringReader; 31 import java.net.URL; 32 33 import javax.xml.stream.XMLInputFactory; 34 import javax.xml.stream.XMLStreamReader; 35 import javax.xml.stream.events.XMLEvent; 36 37 import org.testng.Assert; 38 import org.testng.annotations.AfterMethod; 39 import org.testng.annotations.BeforeMethod; 40 import org.testng.annotations.Listeners; 41 import org.testng.annotations.Test; 42 43 /* 44 * @summary Test StAX parses entity. 45 */ 46 @Listeners({jaxp.library.FilePolicy.class}) 47 public class EntityTest { 48 49 XMLInputFactory factory = null; 50 String output = ""; 51 52 @BeforeMethod 53 protected void setUp() { 54 try { 55 factory = XMLInputFactory.newInstance(); 56 } catch (Exception ex) { 57 Assert.fail("Could not create XMLInputFactory"); 58 } 59 } 60 61 @AfterMethod 62 protected void tearDown() { 63 factory = null; 64 } 65 66 @Test |