Package cucumber
Class StepDefs
- java.lang.Object
-
- cucumber.StepDefs
-
public class StepDefs extends Object
This class connects the feature files with the Cucumber test code
-
-
Constructor Summary
Constructors Constructor Description StepDefs()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
exec_lddtool(String commandArgs, String outputDir)
void
output_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 filevoid
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 outputvoid
run_lddtool()
This method is called to run the lddtool commandvoid
setUp()
This method is called before each test case to set up the test environmentvoid
tearDown()
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
-
-
-
Method Detail
-
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)
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
-
tearDown
public void tearDown()
-
-