Class AssertNextServiceId
- java.lang.Object
-
- com.adaptris.tester.runtime.messages.assertion.AssertNextServiceId
-
- All Implemented Interfaces:
Assertion
,TestComponent
public class AssertNextServiceId extends java.lang.Object implements Assertion
Checks the value ofTestMessage.getNextServiceId()
equalsgetValue()
.In the service test configuration this class is aliased as
assert-next-service-id
which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description AssertNextServiceId()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssertionResult
execute(TestMessage actual, ServiceTestConfig config)
Execute assertion against test message.java.lang.String
expected()
Returns expected result of assertion.java.lang.String
getValue()
Get value to check next service id against.void
setValue(java.lang.String value)
Set value to check next service id against.boolean
showReturnedMessage()
Controls whether returned message should be included in error text.
-
-
-
Method Detail
-
execute
public AssertionResult execute(TestMessage actual, ServiceTestConfig config) throws ServiceTestException
Description copied from interface:Assertion
Execute assertion against test message.- Specified by:
execute
in interfaceAssertion
- Parameters:
actual
- Message resulting from text executionconfig
- Service test config- Returns:
- Return result of assertion using
AssertionResult
- Throws:
ServiceTestException
- wraps thrown exceptions
-
expected
public java.lang.String expected()
Description copied from interface:Assertion
Returns expected result of assertion. Used in error reporting.
-
showReturnedMessage
public boolean showReturnedMessage()
Description copied from interface:Assertion
Controls whether returned message should be included in error text.- Specified by:
showReturnedMessage
in interfaceAssertion
- Returns:
- Whether returned message should be included in error text.
-
setValue
public void setValue(java.lang.String value)
Set value to check next service id against.- Parameters:
value
- Value to check next service id against.
-
getValue
public java.lang.String getValue()
Get value to check next service id against.- Returns:
- Value to check next service id against.
-
-