org.apache.wink.test.mock
Class TestUtils
java.lang.Object
org.apache.wink.test.mock.TestUtils
public class TestUtils
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestUtils
public TestUtils()
packageToPath
public static java.lang.String packageToPath(java.lang.String packageName)
createDocumentBuilder
public static javax.xml.parsers.DocumentBuilder createDocumentBuilder()
throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
getResourceOfSamePackage
public static java.io.InputStream getResourceOfSamePackage(java.lang.String name,
java.lang.Class<?> cls)
- appends package to the name and returns it as stream.
- Parameters:
name
- cls
- TODO
- Returns:
getResourceOfSamePackageAsBytes
public static byte[] getResourceOfSamePackageAsBytes(java.lang.String name,
java.lang.Class<?> cls)
throws java.lang.Exception
- Throws:
java.lang.Exception
getXML
protected static org.w3c.dom.Document getXML(java.lang.String fileName,
java.lang.Class<?> cls)
throws java.lang.Exception
- returns xml from file. Xml must be located in the same package as the
current class.
- Parameters:
fileName
- cls
- TODO
- Returns:
-
- Throws:
java.lang.Exception
getXML
public static org.w3c.dom.Document getXML(byte[] bs)
throws java.lang.Exception
- Throws:
java.lang.Exception
diffIgnoreUpdateWithAttributeQualifier
public static java.lang.String diffIgnoreUpdateWithAttributeQualifier(java.lang.String expectedFileName,
byte[] actual,
java.lang.Class<?> cls)
throws java.lang.Exception
- Throws:
java.lang.Exception
diffIgnoreUpdateWithAttributeQualifier
public static java.lang.String diffIgnoreUpdateWithAttributeQualifier(java.lang.String expected,
java.lang.String actual)
throws java.lang.Exception
- Throws:
java.lang.Exception
diffIgnoreUpdateWithAttributeQualifier
public static java.lang.String diffIgnoreUpdateWithAttributeQualifier(byte[] expected,
byte[] actual)
throws java.lang.Exception
- Throws:
java.lang.Exception
printPrettyXML
public static java.lang.String printPrettyXML(org.w3c.dom.Document doc)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2009 The Apache Software Foundation. All Rights Reserved.