mixinafFancordion::Command
afFancordion::Command
Implement to create your own Fancordion commands. To use your own command in a specification, just add it to the FancordionRunner:
runner := FancordionRunner() myCmd := MyCommand() runner.commands["mycmd"] = myCmd
- canFailFast
virtual Bool canFailFast()If
truethen this command can be ignored should a previous command fail.Defaults to
true.- executeOnFixture
Void executeOnFixture(Obj fixture, Str code)Helper method that executes the given code against the fixture instance. Example:
executeOnFixture(fixture, "toStr()") --> fixture.toStr()
- getFromFixture
Obj? getFromFixture(Obj fixture, Str code)Helper method that executes the given code on the fixture instance and returns a value. Example:
getFromFixture(fixture, "toStr()") --> fixture.toStr()
- pathStr
An alternative to
Uri.pathStr()that does not strip off the fragment, allowing you to use#TEXTand similar in the URI.- runCommand
abstract Void runCommand(FixtureCtx fixCtx, Uri cmdUrl, Str cmdText)Runs the command with the given URI and text.