public abstract class BaseAssertion<C> extends BaseOperation<C> implements PlannedOperation<C>
Assertion
implementations. Subclassing
this class is not required, but does provide some convenience functions for signaling assertion failures.Assertion
,
GroupAssertion
,
ValueAssertion
,
Serialized FormfieldDeclaration, numArgs, trace
Modifier | Constructor and Description |
---|---|
protected |
BaseAssertion() |
protected |
BaseAssertion(int numArgs) |
protected |
BaseAssertion(int numArgs,
java.lang.String message) |
protected |
BaseAssertion(java.lang.String message) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
protected void |
fail() |
protected void |
fail(java.lang.Object... args) |
java.lang.String |
getMessage() |
int |
hashCode() |
boolean |
supportsPlannerLevel(PlannerLevel plannerLevel) |
static void |
throwFail(java.lang.String message)
Static method throwFail should be used to throw an
AssertionException . |
static void |
throwFail(java.lang.String message,
java.lang.Object... args)
Static method throwFail should be used to throw an
AssertionException . |
cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, prepare, printOperationInternal, toString, toStringInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
cleanup, flush, getFieldDeclaration, getNumArgs, isSafe, prepare
protected BaseAssertion()
@ConstructorProperties(value="message") protected BaseAssertion(java.lang.String message)
@ConstructorProperties(value="numArgs") protected BaseAssertion(int numArgs)
@ConstructorProperties(value={"numArgs","message"}) protected BaseAssertion(int numArgs, java.lang.String message)
public java.lang.String getMessage()
public boolean supportsPlannerLevel(PlannerLevel plannerLevel)
supportsPlannerLevel
in interface PlannedOperation<C>
protected void fail()
protected void fail(java.lang.Object... args)
public static void throwFail(java.lang.String message)
AssertionException
.message
- of type String, the message to be thrownpublic static void throwFail(java.lang.String message, java.lang.Object... args)
AssertionException
.message
- of type String, the message to be thrown as a format stringargs
- of type Object[], the values to be passed into the message format stringpublic boolean equals(java.lang.Object object)
equals
in class BaseOperation<C>
public int hashCode()
hashCode
in class BaseOperation<C>
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.