public class JUnitTestAdapter
extends java.lang.Object
implements junit.framework.Test
Test which is created by
wrapping a Latka Suite| Modifier | Constructor and Description |
|---|---|
protected |
JUnitTestAdapter(Suite suite,
int testCount)
Create a Test from a Latka suite and a number of tests
|
| Modifier and Type | Method and Description |
|---|---|
int |
countTestCases()
Provides access, post-parsing, of the number of
request elements in the Latka Suite
|
static junit.framework.Test |
createTestFromFile(java.io.File file)
Create a Test from a
Java file |
static junit.framework.Test |
createTestFromFile(java.lang.String fileName)
Create a Test from a Latka file
|
static junit.framework.Test |
createTestFromResource(java.lang.String resourceName)
Create a Test from a resource accessible via
the
class loader |
static junit.framework.Test |
createTestFromURL(java.lang.String url)
Create a Test from a String containing a URL whose
contents are in Latka's XML format
|
static junit.framework.Test |
createTestFromURL(java.net.URL url)
Create a Test from a URL whose contents are in Latka's XML format
|
protected static int |
parse(org.xml.sax.InputSource xml)
Parse the Latka XML document to count the requests
|
void |
run(junit.framework.TestResult r)
Run the test, adding results to the provided
TestResult |
public static junit.framework.Test createTestFromFile(java.lang.String fileName)
fileName - The name of a readable file in Latka's XML formatpublic static junit.framework.Test createTestFromFile(java.io.File file)
Java filefile - A readable java file containing Latka's XML formatpublic static junit.framework.Test createTestFromResource(java.lang.String resourceName)
class loaderresourceName - A resource accessible by the class loader in Latka's
XML formatpublic static junit.framework.Test createTestFromURL(java.lang.String url)
url - the URL to fetchpublic static junit.framework.Test createTestFromURL(java.net.URL url)
url - the URL to fetchprotected static int parse(org.xml.sax.InputSource xml)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.FactoryConfigurationError,
javax.xml.parsers.ParserConfigurationException
xml - The inputsource to parsejava.io.IOException - When an IO occurs reading the documentorg.xml.sax.SAXException - When the document is invalid XMLjavax.xml.parsers.FactoryConfigurationError - When the SAX Parser factory can't be
configured correctlyjavax.xml.parsers.ParserConfigurationException - When the SAX Parser can't be
configured correctlypublic int countTestCases()
countTestCases in interface junit.framework.Testpublic void run(junit.framework.TestResult r)
TestResultrun in interface junit.framework.Testr - TestResult to accumulateCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.