Class CalloutVerificationTest
java.lang.Object
gg.xp.xivsupport.events.triggers.util.CalloutVerificationTest
CalloutVerificationTest is an all-in-one base class for testing duty callouts. To use this, you need a log file.
The log file should be in the resources, and you specify the path in the
getFileName()
method.
You also need to implement the getExpectedCalls()
method. If you have this method return an empty list,
and then run the test, the log output will contain the actual calls, formatted in the exact form that you would need
to specify the expected calls in. Thus, after checking to make sure they are correct, you can simply copy and paste.
There are also some optional methods to control some extra validations:
getExpectedAms()
lets you specify expected automarker placements.configure(MutablePicoContainer)
lets you poke around in the DI container, in case you want to test alternative configurations or enable triggers which are disabled by default.failOnCalloutErrors()
can be overridden to return 'false' to disable the behavior of flagging any callout containing the string "Error" as being a failure.minimumMsBetweenCalls()
defaults to 1000 (ms) but can be overridden to a lower value. This value will flag callouts which happen in quick succession as failures, as this would often indicate callouts which are talking over one another.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected CalloutInitialValues
protected CalloutInitialValues
protected CalloutInitialValues
callAppend
(long when, String tts, String appendText) protected AmVerificationValues
clearAll
(long when) protected void
configure
(org.picocontainer.MutablePicoContainer pico) protected boolean
protected List<AmVerificationValues>
protected abstract List<CalloutInitialValues>
protected abstract String
protected AmVerificationValues
mark
(long when, MarkerSign marker, Job job) protected long
-
Constructor Details
-
CalloutVerificationTest
public CalloutVerificationTest()
-
-
Method Details
-
getFileName
-
call
-
callAppend
-
call
-
mark
-
clearAll
-
configure
protected void configure(org.picocontainer.MutablePicoContainer pico) -
minimumMsBetweenCalls
protected long minimumMsBetweenCalls() -
getExpectedCalls
-
getExpectedAms
-
failOnCalloutErrors
protected boolean failOnCalloutErrors()
-