@Step("I run step (.*)") public String runAStep(String stepName) { return stepName; } }
@Handler(value = "Chrome Driver Connection") public class ChromeDriverConnectionHandler { @ChorusResource("feature.dir") File featureDir; @Step(".* set the chorus context variable pathToTestHtmlFile") public void setAFilePath() { ChorusContext.getContext().put("pathToTestHtmlFile", "file://" + new File(featureDir, "testHtml.html").getAbsolutePath()); } }
/** * Created by IntelliJ IDEA. * User: Nick Ebbutt * Date: 14/06/12 * Time: 09:21 */ @Handler("Process With Configurations") public class ProcessWithConfigurationsHandler extends ChorusAssert { @Step("Chorus is working properly") public void isWorkingProperly() { } }
/** * Created by nickebbutt on 03/02/2018. */ @SubsystemConfig(id = "mockSubsystemId", implementationClass = "org.chorusbdd.chorus.subsystem.badmockimplclasscannotload.MissingImplClass", overrideImplementationClassSystemProperty = "chorusMockSubsystem") public interface BadMockSubsystem extends Subsystem { }
@Step("I can run a step with value (.*)") public String canRunAFeature(String value) { return value; } }
@Handler("Test Step Publisher Handler") public static class MockHandler { @Step(value = "call a test step", id = "step1") public void callATestStep() { System.out.println("Hello!"); stepCalled.set(true); } }
/** * Created by nickebbutt on 03/02/2018. */ @SubsystemConfig(id="badMockNotAnInterface", implementationClass = "n/a", overrideImplementationClassSystemProperty = "n/a") public class BadMockSubsystemNotAnInterface { }
@Step(".*call an exported method") public String callMethod() { return "dumbledore"; } }
/** * Created by IntelliJ IDEA. * User: Nick Ebbutt * Date: 14/06/12 * Time: 09:21 */ @Handler("Feature Parsing") public class FeatureParsingHandler { @Step("Chorus is working properly") public void isWorkingProperly() { } }
/** * Created by nickebbutt on 03/02/2018. */ @SubsystemConfig( id="", implementationClass = "n/a", overrideImplementationClassSystemProperty = "n/a") public interface BadMockSubsystem extends Subsystem { }
@Step("I call a step method exported by handler one") public String exportHandlerOne() { return "One"; } }
/** * Created by IntelliJ IDEA. * User: Nick Ebbutt * Date: 14/06/12 * Time: 09:21 */ @Handler("Start A Process Without Logging") public class StartAProcessHandler extends ChorusAssert { @Step("Chorus is working properly") public void isWorkingProperly() { } }
/** * Created by nickebbutt on 03/02/2018. */ @SubsystemConfig(id = "mockSubsystemId", implementationClass = "org.chorusbdd.chorus.subsystem.mock.MockSubsystemImpl", overrideImplementationClassSystemProperty = "chorusMockSubsystem") public interface MockSubsystem extends Subsystem { }
@Step("call a remote method") public String callARemoteMethod() { return "true"; } }
@Handler("DynamicProcessHandler") public static class DynamicProcessHandler { @Step(".*call an exported method") public String callMethod() { return "dumbledore"; } }
/** * Created by nickebbutt on 03/02/2018. */ @SubsystemConfig(id = "mockSubsystemId", implementationClass = "n/a", overrideImplementationClassSystemProperty = "chorusMockSubsystem") public interface BadMockSubsystem { }
@Step("I can call an exported method on scoped") public String callAMethod() { return "OK"; } }
/** * Created by IntelliJ IDEA. * User: Nick Ebbutt * Date: 14/06/12 * Time: 09:21 */ @Handler("Start A Process With Classpath") public class ProcessWithClasspathHandler extends ChorusAssert { @Step("Chorus is working properly") public void isWorkingProperly() { } }
@Step(".*I call a step passing the value (.*) and the (?:variable gets|variables get) expanded") public String expandStep(String value) { return value; } }
@Step(".* call a step on the second publisher") public String sayHelloFromSecondPublisher() { return "Hello!"; } }