(no commit message)
[utils] / support / general / src / test / java / org / wamblee / xml / XslTransformerTest.java
index 8b06f01d683c8bfb47aca058dceb5f2555af1a2f..c3cf78b06775ff1964deb40eced8ba89c2510026 100644 (file)
@@ -1,12 +1,12 @@
 /*
- * Copyright 2005 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  */
 package org.wamblee.xml;
 
-import junit.framework.TestCase;
-
-import org.w3c.dom.Document;
-
-import org.wamblee.io.ClassPathResource;
-import org.wamblee.io.FileSystemUtils;
-import org.wamblee.io.InputResource;
-
 import java.io.ByteArrayOutputStream;
-import java.io.File;
 import java.io.IOException;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -35,6 +26,13 @@ import javax.xml.transform.TransformerException;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+import org.wamblee.io.ClassPathResource;
+import org.wamblee.io.FileSystemUtils;
+import org.wamblee.io.InputResource;
+
 /**
  * Tests the XSL transformer.
  * 
@@ -123,7 +121,7 @@ public class XslTransformerTest extends TestCase {
             .read(xmlResource.getInputStream()).getBytes();
 
         try {
-            Document output1 = transformer.transform(documentData, xslt);
+            transformer.transform(documentData, xslt);
         } catch (TransformerException e) {
             return; // ok
         }
@@ -148,7 +146,7 @@ public class XslTransformerTest extends TestCase {
             .read(xmlResource.getInputStream()).getBytes();
 
         try {
-            Document output1 = transformer.transform(documentData, xslt);
+            transformer.transform(documentData, xslt);
         } catch (TransformerException e) {
             return; // ok
         }
@@ -174,7 +172,7 @@ public class XslTransformerTest extends TestCase {
             .read(xmlResource.getInputStream()).getBytes();
 
         try {
-            Document output1 = transformer.transform(documentData, xslt);
+            transformer.transform(documentData, xslt);
         } catch (TransformerException e) {
             return; // ok
         }
@@ -237,8 +235,7 @@ public class XslTransformerTest extends TestCase {
         XslTransformer transformer = new XslTransformer();
 
         try {
-            Source source = transformer
-                .resolve("org/wamblee/xml/utilities-nonexistent.xsl");
+            transformer.resolve("org/wamblee/xml/utilities-nonexistent.xsl");
         } catch (TransformerException e) {
             return; // ok
         }