X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fxml%2FXslTransformerTest.java;h=c3cf78b06775ff1964deb40eced8ba89c2510026;hb=26805fc0810098c4bd8009a35c8719478e74153e;hp=8b06f01d683c8bfb47aca058dceb5f2555af1a2f;hpb=539c6d91b7a34e32c6669445d00e9275c337530a;p=utils diff --git a/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java b/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java index 8b06f01d..c3cf78b0 100644 --- a/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java +++ b/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java @@ -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. @@ -15,16 +15,7 @@ */ 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 }