Package cucumber
Class StepDefs
java.lang.Object
cucumber.StepDefs
This class connects the feature files with the Cucumber test code
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexec_lddtool(String commandArgs, String outputDir) voidoutput_should_match_expected_file(String actualOutputFile, String expectedOutputFile, String excludeStrings) This method is called after each test case to compare the actual-generated file with the expected filevoidoutput_should_match_expected_response(String assertType, String output, String actualOutputFile) This method is called after each test case to compare the actual output with the expected outputvoidThis method is called to run the lddtool commandvoidsetUp()This method is called before each test case to set up the test environmentvoidtearDown()voidtest_directories_and_command_arguments(String inDir, String outDir, String commandArgs) This method is called before each test case to set up the test environment
-
Constructor Details
-
StepDefs
public StepDefs()
-
-
Method Details
-
setUp
public void setUp()This method is called before each test case to set up the test environment -
test_directories_and_command_arguments
@Given("the directories {string}, {string}, and command arguments {string}") public void test_directories_and_command_arguments(String inDir, String outDir, String commandArgs) This method is called before each test case to set up the test environment- Parameters:
inputDirectory- the resource directoryoutputDirectory- the test directorycommandArgs- the command arguments
-
run_lddtool
@When("lddtool is run") public void run_lddtool()This method is called to run the lddtool command -
output_should_match_expected_response
@Then("the produced output from lddtool command should {string} {string} in {string} file") public void output_should_match_expected_response(String assertType, String output, String actualOutputFile) This method is called after each test case to compare the actual output with the expected output- Parameters:
assertType- the type of assertion to performoutput- the expected outputactualOutputFile- the source of the actual output
-
output_should_match_expected_file
@Then("the contents of file {string} should match {string} except for lines containing comma-separated strings in {string}") public void output_should_match_expected_file(String actualOutputFile, String expectedOutputFile, String excludeStrings) throws IOException This method is called after each test case to compare the actual-generated file with the expected file- Parameters:
actualOutputFile- the source of the actual outputexpectedOutputFile- the source of the expected outputexcludeStrings- the lines to exclude from the comparison- Throws:
IOException
-
exec_lddtool
-
tearDown
public void tearDown()
-