org.apache.qpid.test.framework
Class NotApplicableAssertion
java.lang.Object
org.apache.qpid.test.framework.NotApplicableAssertion
- All Implemented Interfaces:
- Assertion
public class NotApplicableAssertion
- extends Object
- implements Assertion
NotApplicableAssertion is a messaging assertion that can be used when an assertion requested by a test-case is not
applicable to the testing scenario. For example an assertion may relate to AMQP functionality, but a test case may be
being run over a non-AMQP JMS implementation, in which case the request to create the assertion may return this
instead of the proper assertion. The test framework is configurable to quietly drop these assertions, log them
as warnings to the console, or raise them as test failures.
CRC Card
Responsibilities | Collaborations
|
---|
Quitely pass.
|
Log a warning.
|
Raise a test failure.
|
Constructor Summary |
NotApplicableAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProperties)
Creates an assertion that is driven by the value of the 'notApplicableAssertion' property of the test
configuration. |
Method Summary |
boolean |
apply()
Applies the assertion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotApplicableAssertion
public NotApplicableAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProperties)
- Creates an assertion that is driven by the value of the 'notApplicableAssertion' property of the test
configuration. Its value should match one of 'quiet', 'warn' or 'fail' and if it does not it is automatically
read as 'fail'.
- Parameters:
testProperties
- The test configuration properties.
apply
public boolean apply()
- Applies the assertion.
- Specified by:
apply
in interface Assertion
- Returns:
- true if the assertion passes, false if it fails.
Licensed to the Apache Software Foundation