| org.apache.derbyTesting.junit.BaseTestCase
All known Subclasses: org.apache.derbyTesting.junit.BaseJDBCTestCase, org.apache.derbyTesting.functionTests.tests.jdbc4.JDBC40TranslationTest, org.apache.derbyTesting.functionTests.suites.AllPackages, org.apache.derbyTesting.functionTests.tests.derbynet.SqlExceptionTest, org.apache.derbyTesting.functionTests.tests.jdbc4._Suite, org.apache.derbyTesting.functionTests.tests.junitTests.derbyNet.OwnServerTests, org.apache.derbyTesting.functionTests.tests.lang._Suite, org.apache.derbyTesting.functionTests.tests.derbynet.ByteArrayCombinerStreamTest, org.apache.derbyTesting.functionTests.tests.tools._Suite, org.apache.derbyTesting.functionTests.suites.All, org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite, org.apache.derbyTesting.functionTests.suites.Embedded, org.apache.derbyTesting.functionTests.suites.Client, org.apache.derbyTesting.functionTests.tests.i18n.MessageBundleTest,
BaseTestCase | abstract public class BaseTestCase extends TestCase (Code) | | Base class for JUnit tests.
|
Constructor Summary | |
public | BaseTestCase(String name) Create a test case with the given name. |
BaseTestCase | public BaseTestCase(String name)(Code) | | Create a test case with the given name.
Parameters: name - name of the test case. |
alarm | public static void alarm(String text)(Code) | | Print alarm string
Parameters: text - String to print |
assertEquals | public static void assertEquals(InputStream is1, InputStream is2) throws IOException(Code) | | Compare the contents of two streams.
The streams are closed after they are exhausted.
Parameters: is1 - the first stream Parameters: is2 - the second stream throws: IOException - if reading from the streams fail throws: AssertionFailedError - if the stream contents are not equal |
assertEquals | public static void assertEquals(Reader r1, Reader r2) throws IOException(Code) | | Compare the contents of two readers.
The readers are closed after they are exhausted.
Parameters: r1 - the first reader Parameters: r2 - the second reader throws: IOException - if reading from the streams fail throws: AssertionFailedError - if the reader contents are not equal |
assertSecurityManager | public static void assertSecurityManager()(Code) | | Assert a security manager is installed.
|
getSystemProperty | protected static String getSystemProperty(String name)(Code) | | Get system property.
Parameters: name - name of the property |
getTestConfiguration | final public TestConfiguration getTestConfiguration()(Code) | | Return the current configuration for the test.
|
getTestResource | protected static URL getTestResource(String name)(Code) | | Obtain the URL for a test resource, e.g. a policy
file or a SQL script.
Parameters: name - Resource name, typically - org.apache.derbyTesing.something URL to the resource, null if it does not exist. |
openTestResource | protected static InputStream openTestResource(URL url) throws PrivilegedActionException(Code) | | Open the URL for a a test resource, e.g. a policy
file or a SQL script.
Parameters: url - URL obtained from getTestResource An open stream |
printStackTrace | public static void printStackTrace(Throwable t)(Code) | | Print debug string.
Parameters: t - Throwable object to print stack trace from |
println | public static void println(String text)(Code) | | Print debug string.
Parameters: text - String to print |
removeSystemProperty | protected static void removeSystemProperty(String name)(Code) | | Remove system property
Parameters: name - name of the property |
runBare | final public void runBare() throws Throwable(Code) | | Run the test and force installation of a security
manager with the default test policy file.
Individual tests can run without a security
manager or with a different policy file using
the decorators obtained from SecurityManagerSetup.
Method is final to ensure security manager is
enabled by default. Tests should not need to
override runTest, instead use test methods
setUp, tearDown methods and decorators.
|
setSystemProperty | protected static void setSystemProperty(String name, String value)(Code) | | Set system property
Parameters: name - name of the property Parameters: value - value of the property |
|
|