|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.test.utils.AssertThrows
public abstract class AssertThrows
Helper class to simplify negative testing. Usage:
new AssertThrows() { public void test() { Integer.parseInt("not a number"); }};
Constructor Summary | |
---|---|
AssertThrows()
Create a new assertion object, and call the test method to verify the expected exception is thrown. |
|
AssertThrows(java.lang.Class<? extends java.lang.Exception> expectedExceptionClass)
Create a new assertion object, and call the test method to verify the expected exception is thrown. |
|
AssertThrows(int expectedErrorCode)
Create a new assertion object, and call the test method to verify the expected exception is thrown. |
Method Summary | |
---|---|
abstract void |
test()
The test method that is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssertThrows(java.lang.Class<? extends java.lang.Exception> expectedExceptionClass)
expectedExceptionClass
- the expected exception classpublic AssertThrows()
public AssertThrows(int expectedErrorCode)
expectedErrorCode
- the error code of the exceptionMethod Detail |
---|
public abstract void test() throws java.lang.Exception
java.lang.Exception
- the exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |