<HTML><HEAD><META CONTENT="text/html; charset=UTF-8" HTTP-EQUIV="Content-Type"/><TITLE>EMMA Coverage Report</TITLE><STYLE TYPE="text/css"> TABLE,TD,TH {border-style:solid; border-color:black;} TD,TH {background:white;margin:0;line-height:100%;padding-left:0.5em;padding-right:0.5em;} TD {border-width:0 1px 0 0;} TH {border-width:1px 1px 1px 0;} TR TD.h {color:red;} TABLE {border-spacing:0; border-collapse:collapse;border-width:0 0 1px 1px;} P,H1,H2,H3,TH {font-family:verdana,arial,sans-serif;font-size:10pt;} TD {font-family:courier,monospace;font-size:10pt;} TABLE.hdft {border-spacing:0;border-collapse:collapse;border-style:none;} TABLE.hdft TH,TABLE.hdft TD {border-style:none;line-height:normal;} TABLE.hdft TH.tl,TABLE.hdft TD.tl {background:#6699CC;color:white;} TABLE.hdft TD.nv {background:#6633DD;color:white;} .nv A:link {color:white;} .nv A:visited {color:white;} .nv A:active {color:yellow;} TABLE.hdft A:link {color:white;} TABLE.hdft A:visited {color:white;} TABLE.hdft A:active {color:yellow;} .in {color:#356085;} TABLE.s TD {padding-left:0.25em;padding-right:0.25em;} TABLE.s TD.l {padding-left:0.25em;padding-right:0.25em;text-align:right;background:#F0F0F0;} TABLE.s TR.z TD {background:#FF9999;} TABLE.s TR.p TD {background:#FFFF88;} TABLE.s TR.c TD {background:#CCFFCC;} A:link {color:#0000EE;text-decoration:none;} A:visited {color:#0000EE;text-decoration:none;} A:hover {color:#0000EE;text-decoration:underline;} TABLE.cn {border-width:0 0 1px 0;} TABLE.s {border-width:1px 0 1px 1px;} TD.h {color:red;border-width:0 1px 0 0;} TD.f {border-width:0 1px 0 1px;} TD.hf {color:red;border-width:0 1px 0 1px;} TH.f {border-width:1px 1px 1px 1px;} TR.cis TD {background:#F0F0F0;} TR.cis TD {border-width:1px 1px 1px 0;} TR.cis TD.h {color:red;border-width:1px 1px 1px 0;} TR.cis TD.f {border-width:1px 1px 1px 1px;} TR.cis TD.hf {color:red;border-width:1px 1px 1px 1px;} TD.b {border-style:none;background:transparent;line-height:50%;} TD.bt {border-width:1px 0 0 0;background:transparent;line-height:50%;} TR.o TD {background:#F0F0F0;}TABLE.it {border-style:none;}TABLE.it TD,TABLE.it TH {border-style:none;}</STYLE></HEAD><BODY><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="tl"><A HREF="http://www.eclemma.org/">EMMA</A> Coverage Report (generated Fri Feb 20 18:44:54 GMT 2009)</TH></TR><TR><TD CLASS="nv">[<A HREF="../xslUnitTestCoverage.html">all classes</A>][<A HREF="c0.html">org.eclipse.wst.xsl.launching.tests.testcase</A>]</TD></TR></TABLE><H2>COVERAGE SUMMARY FOR SOURCE FILE [<SPAN CLASS="in">XSLLaunchingTests.java</SPAN>]</H2><TABLE CELLSPACING="0" WIDTH="100%"><TR><TH>name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD>XSLLaunchingTests.java</TD><TD>100% (1/1)</TD><TD CLASS="h">57% (4/7)</TD><TD CLASS="h">59% (127/214)</TD><TD CLASS="h">61% (33.8/55)</TD></TR></TABLE><H3>COVERAGE BREAKDOWN BY CLASS AND METHOD</H3><TABLE CLASS="cn" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="f">name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#0">XSLLaunchingTests</A></TD><TD>100% (1/1)</TD><TD CLASS="h">57% (4/7)</TD><TD CLASS="h">59% (127/214)</TD><TD CLASS="h">61% (33.8/55)</TD></TR><TR><TD CLASS="f"><A HREF="#1">parseXml (InputStream): Document</A></TD><TD> </TD><TD CLASS="h">0% (0/1)</TD><TD CLASS="h">0% (0/9)</TD><TD CLASS="h">0% (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2">readFile (InputStream): String</A></TD><TD> </TD><TD CLASS="h">0% (0/1)</TD><TD CLASS="h">0% (0/33)</TD><TD CLASS="h">0% (0/7)</TD></TR><TR><TD CLASS="f"><A HREF="#3">testBuildConfig (): void</A></TD><TD> </TD><TD CLASS="h">0% (0/1)</TD><TD CLASS="h">0% (0/39)</TD><TD CLASS="h">0% (0/8)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#4">launchConfiguration (IPath, String): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>94% (101/107)</TD><TD>92% (24.8/27)</TD></TR><TR><TD CLASS="f"><A HREF="#0">XSLLaunchingTests (): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (6/6)</TD><TD>100% (2/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#6">setUp (): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (14/14)</TD><TD>100% (4/4)</TD></TR><TR><TD CLASS="f"><A HREF="#7">tearDown (): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (6/6)</TD><TD>100% (3/3)</TD></TR></TABLE><P></P><TABLE CLASS="s" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="l">1</TD><TD>/*******************************************************************************</TD></TR><TR><TD CLASS="l">2</TD><TD> * Copyright (c) 2008 Jesper Steen M�ller</TD></TR><TR><TD CLASS="l">3</TD><TD> * All rights reserved. This program and the accompanying materials</TD></TR><TR><TD CLASS="l">4</TD><TD> * are made available under the terms of the Eclipse Public License v1.0</TD></TR><TR><TD CLASS="l">5</TD><TD> * which accompanies this distribution, and is available at</TD></TR><TR><TD CLASS="l">6</TD><TD> * http://www.eclipse.org/legal/epl-v10.html</TD></TR><TR><TD CLASS="l">7</TD><TD> *</TD></TR><TR><TD CLASS="l">8</TD><TD> * Contributors:</TD></TR><TR><TD CLASS="l">9</TD><TD> * Jesper Steen M�ller - initial XSL launching test</TD></TR><TR><TD CLASS="l">10</TD><TD> *******************************************************************************/</TD></TR><TR><TD CLASS="l">11</TD><TD> </TD></TR><TR><TD CLASS="l">12</TD><TD>package org.eclipse.wst.xsl.launching.tests.testcase;</TD></TR><TR><TD CLASS="l">13</TD><TD> </TD></TR><TR><TD CLASS="l">14</TD><TD>import java.io.BufferedReader;</TD></TR><TR><TD CLASS="l">15</TD><TD>import java.io.IOException;</TD></TR><TR><TD CLASS="l">16</TD><TD>import java.io.InputStream;</TD></TR><TR><TD CLASS="l">17</TD><TD>import java.io.InputStreamReader;</TD></TR><TR><TD CLASS="l">18</TD><TD>import java.io.UnsupportedEncodingException;</TD></TR><TR><TD CLASS="l">19</TD><TD> </TD></TR><TR><TD CLASS="l">20</TD><TD>import javax.xml.parsers.DocumentBuilder;</TD></TR><TR><TD CLASS="l">21</TD><TD>import javax.xml.parsers.DocumentBuilderFactory;</TD></TR><TR><TD CLASS="l">22</TD><TD>import javax.xml.parsers.ParserConfigurationException;</TD></TR><TR><TD CLASS="l">23</TD><TD> </TD></TR><TR><TD CLASS="l">24</TD><TD>import junit.framework.TestCase;</TD></TR><TR><TD CLASS="l">25</TD><TD> </TD></TR><TR><TD CLASS="l">26</TD><TD>import org.eclipse.core.resources.IFile;</TD></TR><TR><TD CLASS="l">27</TD><TD>import org.eclipse.core.resources.IProject;</TD></TR><TR><TD CLASS="l">28</TD><TD>import org.eclipse.core.runtime.CoreException;</TD></TR><TR><TD CLASS="l">29</TD><TD>import org.eclipse.core.runtime.IPath;</TD></TR><TR><TD CLASS="l">30</TD><TD>import org.eclipse.core.runtime.NullProgressMonitor;</TD></TR><TR><TD CLASS="l">31</TD><TD>import org.eclipse.debug.core.DebugPlugin;</TD></TR><TR><TD CLASS="l">32</TD><TD>import org.eclipse.debug.core.ILaunch;</TD></TR><TR><TD CLASS="l">33</TD><TD>import org.eclipse.debug.core.ILaunchConfiguration;</TD></TR><TR><TD CLASS="l">34</TD><TD>import org.eclipse.debug.core.ILaunchManager;</TD></TR><TR><TD CLASS="l"><A NAME="0">35</A></TD><TD>import org.eclipse.wst.xsl.launching.tests.TestEnvironment;</TD></TR><TR><TD CLASS="l">36</TD><TD>import org.w3c.dom.Document;</TD></TR><TR><TD CLASS="l">37</TD><TD>import org.xml.sax.SAXException;</TD></TR><TR><TD CLASS="l">38</TD><TD> </TD></TR><TR CLASS="c"><TD CLASS="l">39</TD><TD>public class XSLLaunchingTests extends TestCase {</TD></TR><TR><TD CLASS="l">40</TD><TD> </TD></TR><TR><TD CLASS="l">41</TD><TD> private TestEnvironment _env;</TD></TR><TR><TD CLASS="l">42</TD><TD> private IProject _testProject;</TD></TR><TR CLASS="c"><TD CLASS="l">43</TD><TD> private String launchXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>"</TD></TR><TR><TD CLASS="l">44</TD><TD> + "<launchConfiguration type=\"org.eclipse.wst.xsl.launching.launchConfigurationType\">"</TD></TR><TR><TD CLASS="l">45</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.jaxp.launching.ATTR_ATTRIBUTES\" value=\"&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;Attributes/&gt;&#13;&#10;\"/>"</TD></TR><TR><TD CLASS="l">46</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.jaxp.launching.ATTR_OUTPUT_PROPERTIES\" value=\"&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;Properties/&gt;&#13;&#10;\"/>"</TD></TR><TR><TD CLASS="l">47</TD><TD> + "<booleanAttribute key=\"org.eclipse.wst.xsl.jaxp.launching.ATTR_USE_DEFAULT_PROCESSOR\" value=\"true\"/>"</TD></TR><TR><TD CLASS="l">48</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.jaxp.launching.INVOKER_DESCRIPTOR\" value=\"org.eclipse.wst.xsl.launching.jaxp.invoke\"/>"</TD></TR><TR><TD CLASS="l">49</TD><TD> + "<booleanAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_FORMAT_FILE\" value=\"false\"/>"</TD></TR><TR><TD CLASS="l">50</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_INPUT_FILE\" value=\"${workspace_loc:/XSLTestProject/input.xml}\"/>"</TD></TR><TR><TD CLASS="l">51</TD><TD> + "<booleanAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_OPEN_FILE\" value=\"true\"/>"</TD></TR><TR><TD CLASS="l">52</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_OUTPUT_FILENAME\" value=\"output.xml\"/>"</TD></TR><TR><TD CLASS="l">53</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_PIPELINE\" value=\"&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;Pipeline&gt;&#13;&#10;&lt;OutputProperties/&gt;&#13;&#10;&lt;Transform path=&quot;/XSLTestProject/transform.xsl&quot; pathType=&quot;resource&quot;&gt;&#13;&#10;&lt;Parameters/&gt;&#13;&#10;&lt;/Transform&gt;&#13;&#10;&lt;/Pipeline&gt;&#13;&#10;\"/>"</TD></TR><TR><TD CLASS="l">54</TD><TD> + "<booleanAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_USE_DEFAULT_OUTPUT_FILE\" value=\"false\"/>"</TD></TR><TR><TD CLASS="l">55</TD><TD> + "<stringAttribute key=\"org.eclipse.wst.xsl.launching.ATTR_OUTPUT_FOLDER\" value=\"${workspace_loc:/XSLTestProject}\"/>"</TD></TR><TR><TD CLASS="l"><A NAME="6">56</A></TD><TD> + "</launchConfiguration>";</TD></TR><TR><TD CLASS="l">57</TD><TD> </TD></TR><TR><TD CLASS="l">58</TD><TD> @Override</TD></TR><TR><TD CLASS="l">59</TD><TD> protected void setUp() throws Exception {</TD></TR><TR CLASS="c"><TD CLASS="l">60</TD><TD> super.setUp();</TD></TR><TR CLASS="c"><TD CLASS="l">61</TD><TD> _env = new TestEnvironment();</TD></TR><TR CLASS="c"><TD CLASS="l">62</TD><TD> _testProject = _env.createProject("XSLTestProject");</TD></TR><TR CLASS="c"><TD CLASS="l">63</TD><TD> }</TD></TR><TR><TD CLASS="l"><A NAME="4">64</A></TD><TD> </TD></TR><TR><TD CLASS="l">65</TD><TD> private void launchConfiguration(IPath folder, String launchXml)</TD></TR><TR><TD CLASS="l">66</TD><TD> throws CoreException, UnsupportedEncodingException,</TD></TR><TR><TD CLASS="l">67</TD><TD> InterruptedException {</TD></TR><TR CLASS="c"><TD CLASS="l">68</TD><TD> String name = "launch" + (int) (Math.random() * 1000);</TD></TR><TR CLASS="c"><TD CLASS="l">69</TD><TD> _env.addFile(folder, name + ".launch", launchXml);</TD></TR><TR><TD CLASS="l">70</TD><TD> </TD></TR><TR CLASS="c"><TD CLASS="l">71</TD><TD> ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();</TD></TR><TR CLASS="c"><TD CLASS="l">72</TD><TD> ILaunchConfiguration[] allConfigs = mgr.getLaunchConfigurations();</TD></TR><TR CLASS="c"><TD CLASS="l">73</TD><TD> ILaunchConfiguration mine = null;</TD></TR><TR CLASS="c"><TD CLASS="l">74</TD><TD> boolean found = false;</TD></TR><TR CLASS="c"><TD CLASS="l">75</TD><TD> for (ILaunchConfiguration lc : allConfigs) {</TD></TR><TR CLASS="c"><TD CLASS="l">76</TD><TD> if (lc.getName().equals(name)) {</TD></TR><TR CLASS="c"><TD CLASS="l">77</TD><TD> found = true;</TD></TR><TR CLASS="c"><TD CLASS="l">78</TD><TD> mine = lc;</TD></TR><TR CLASS="c"><TD CLASS="l">79</TD><TD> assertEquals(</TD></TR><TR CLASS="c"><TD CLASS="l">80</TD><TD> "bad launch config type?",</TD></TR><TR CLASS="c"><TD CLASS="l">81</TD><TD> "org.eclipse.wst.xsl.launching.launchConfigurationType",</TD></TR><TR CLASS="c"><TD CLASS="l">82</TD><TD> lc.getType().getIdentifier());</TD></TR><TR CLASS="c"><TD CLASS="l">83</TD><TD> assertEquals("bad launch config plugin?",</TD></TR><TR CLASS="c"><TD CLASS="l">84</TD><TD> "org.eclipse.wst.xsl.launching", lc.getType()</TD></TR><TR CLASS="c"><TD CLASS="l">85</TD><TD> .getPluginIdentifier());</TD></TR><TR><TD CLASS="l">86</TD><TD> }</TD></TR><TR><TD CLASS="l">87</TD><TD> }</TD></TR><TR CLASS="c"><TD CLASS="l">88</TD><TD> assertTrue("expected to find the launch config we just added", found);</TD></TR><TR><TD CLASS="l">89</TD><TD> </TD></TR><TR CLASS="c"><TD CLASS="l">90</TD><TD> ILaunch launch = mine.launch(ILaunchManager.RUN_MODE,</TD></TR><TR CLASS="c"><TD CLASS="l">91</TD><TD> new NullProgressMonitor());</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="76% line coverage (19 out of 25 instructions)">92</TD><TD TITLE="76% line coverage (19 out of 25 instructions)"> for (int i = 0; i < 400 && !launch.isTerminated(); ++i) {</TD></TR><TR CLASS="z"><TD CLASS="l">93</TD><TD> System.out.println("waiting");</TD></TR><TR CLASS="z"><TD CLASS="l">94</TD><TD> Thread.sleep(200);</TD></TR><TR><TD CLASS="l">95</TD><TD> }</TD></TR><TR CLASS="c"><TD CLASS="l">96</TD><TD> assertTrue("Launch did not complete within a 20 second time period",</TD></TR><TR CLASS="c"><TD CLASS="l">97</TD><TD> launch.isTerminated());</TD></TR><TR><TD CLASS="l">98</TD><TD> </TD></TR><TR CLASS="c"><TD CLASS="l">99</TD><TD> _testProject.refreshLocal(2, null);</TD></TR><TR CLASS="c"><TD CLASS="l"><A NAME="3">100</A></TD><TD> }</TD></TR><TR><TD CLASS="l">101</TD><TD> </TD></TR><TR><TD CLASS="l">102</TD><TD> public void testBuildConfig() throws CoreException, InterruptedException,</TD></TR><TR><TD CLASS="l">103</TD><TD> ParserConfigurationException, SAXException, IOException {</TD></TR><TR CLASS="z"><TD CLASS="l">104</TD><TD> IPath folder = _testProject.getFullPath();</TD></TR><TR CLASS="z"><TD CLASS="l">105</TD><TD> _env.addFileFromResource(folder, "input.xml", "1-input.xml");</TD></TR><TR CLASS="z"><TD CLASS="l">106</TD><TD> _env.addFileFromResource(folder, "transform.xsl", "1-transform.xsl");</TD></TR><TR><TD CLASS="l">107</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">108</TD><TD> launchConfiguration(folder, launchXml);</TD></TR><TR CLASS="z"><TD CLASS="l">109</TD><TD> IFile output = _testProject.getFile("output.xml");</TD></TR><TR CLASS="z"><TD CLASS="l">110</TD><TD> Document doc = parseXml(output.getContents(true));</TD></TR><TR><TD CLASS="l">111</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">112</TD><TD> assertEquals("root-out", doc.getDocumentElement().getNodeName());</TD></TR><TR CLASS="z"><TD CLASS="l">113</TD><TD> }</TD></TR><TR><TD CLASS="l">114</TD><TD> </TD></TR><TR><TD CLASS="l">115</TD><TD> /**</TD></TR><TR><TD CLASS="l">116</TD><TD> * Test to make sure comments are being copied out to the output file.</TD></TR><TR><TD CLASS="l">117</TD><TD> * bug 253703</TD></TR><TR><TD CLASS="l">118</TD><TD> * @throws CoreException</TD></TR><TR><TD CLASS="l">119</TD><TD> * @throws InterruptedException</TD></TR><TR><TD CLASS="l">120</TD><TD> * @throws ParserConfigurationException</TD></TR><TR><TD CLASS="l">121</TD><TD> * @throws SAXException</TD></TR><TR><TD CLASS="l">122</TD><TD> * @throws IOException</TD></TR><TR><TD CLASS="l">123</TD><TD> */</TD></TR><TR><TD CLASS="l">124</TD><TD>// public void testTransformComments() throws CoreException, InterruptedException,</TD></TR><TR><TD CLASS="l">125</TD><TD>// ParserConfigurationException, SAXException, IOException {</TD></TR><TR><TD CLASS="l">126</TD><TD>// IPath folder = _testProject.getFullPath();</TD></TR><TR><TD CLASS="l">127</TD><TD>// _env.addFileFromResource(folder, "input.xml", "testCommentInput.xml");</TD></TR><TR><TD CLASS="l">128</TD><TD>// _env.addFileFromResource(folder, "transform.xsl", "testComments.xsl");</TD></TR><TR><TD CLASS="l">129</TD><TD>// _env.addFileFromResource(folder, "expected.xml", "testCommentsExpected.xml");</TD></TR><TR><TD CLASS="l">130</TD><TD>//</TD></TR><TR><TD CLASS="l">131</TD><TD>// launchConfiguration(folder, launchXml);</TD></TR><TR><TD CLASS="l">132</TD><TD>// IFile output = _testProject.getFile("output.xml");</TD></TR><TR><TD CLASS="l">133</TD><TD>// IFile expected = _testProject.getFile("expected.xml");</TD></TR><TR><TD CLASS="l">134</TD><TD>// </TD></TR><TR><TD CLASS="l">135</TD><TD>// String result = readFile(output.getContents());</TD></TR><TR><TD CLASS="l">136</TD><TD>// String wanted = readFile(expected.getContents());</TD></TR><TR><TD CLASS="l">137</TD><TD>// </TD></TR><TR><TD CLASS="l">138</TD><TD>// assertEquals("Unexpected results:", wanted, result);</TD></TR><TR><TD CLASS="l"><A NAME="2">139</A></TD><TD>// }</TD></TR><TR><TD CLASS="l">140</TD><TD> </TD></TR><TR><TD CLASS="l">141</TD><TD> private String readFile(InputStream input) {</TD></TR><TR><TD CLASS="l">142</TD><TD> String str;</TD></TR><TR CLASS="z"><TD CLASS="l">143</TD><TD> String finalString = "";</TD></TR><TR><TD CLASS="l">144</TD><TD> try {</TD></TR><TR CLASS="z"><TD CLASS="l">145</TD><TD> BufferedReader in = new BufferedReader(new InputStreamReader(input));</TD></TR><TR CLASS="z"><TD CLASS="l">146</TD><TD> while ((str = in.readLine()) != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">147</TD><TD> finalString = finalString + str + "\n";</TD></TR><TR><TD CLASS="l">148</TD><TD> }</TD></TR><TR CLASS="z"><TD CLASS="l">149</TD><TD> in.close();</TD></TR><TR CLASS="z"><TD CLASS="l">150</TD><TD> } catch (IOException e) {</TD></TR><TR><TD CLASS="l">151</TD><TD> }</TD></TR><TR CLASS="z"><TD CLASS="l">152</TD><TD> return finalString;</TD></TR><TR><TD CLASS="l">153</TD><TD> }</TD></TR><TR><TD CLASS="l"><A NAME="1">154</A></TD><TD> </TD></TR><TR><TD CLASS="l">155</TD><TD> static private Document parseXml(InputStream contents)</TD></TR><TR><TD CLASS="l">156</TD><TD> throws ParserConfigurationException, SAXException, IOException {</TD></TR><TR CLASS="z"><TD CLASS="l">157</TD><TD> DocumentBuilderFactory builderFactory = DocumentBuilderFactory</TD></TR><TR CLASS="z"><TD CLASS="l">158</TD><TD> .newInstance();</TD></TR><TR CLASS="z"><TD CLASS="l">159</TD><TD> DocumentBuilder builder = builderFactory.newDocumentBuilder();</TD></TR><TR><TD CLASS="l">160</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">161</TD><TD> return builder.parse(contents);</TD></TR><TR><TD CLASS="l"><A NAME="7">162</A></TD><TD> }</TD></TR><TR><TD CLASS="l">163</TD><TD> </TD></TR><TR><TD CLASS="l">164</TD><TD> @Override</TD></TR><TR><TD CLASS="l">165</TD><TD> protected void tearDown() throws Exception {</TD></TR><TR CLASS="c"><TD CLASS="l">166</TD><TD> _env.dispose();</TD></TR><TR CLASS="c"><TD CLASS="l">167</TD><TD> super.tearDown();</TD></TR><TR CLASS="c"><TD CLASS="l">168</TD><TD> }</TD></TR><TR><TD CLASS="l">169</TD><TD>}</TD></TR></TABLE><P></P><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="nv">[<A HREF="../xslUnitTestCoverage.html">all classes</A>][<A HREF="c0.html">org.eclipse.wst.xsl.launching.tests.testcase</A>]</TD></TR><TR><TD CLASS="tl"><A HREF="http://www.eclemma.org/support.html">EMMA 2.0.5312 EclEmma Fix 1</A> (C) Vladimir Roubtsov</TD></TR></TABLE></BODY></HTML> |