public class CommandLineSteps extends Object
| Constructor and Description |
|---|
CommandLineSteps(PropertyStore propertyStore,
PlaceholderResolver placeholderResolver) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendFile(String file,
String content) |
void |
cleanUp() |
void |
createFile(String file,
String content) |
void |
delete(String file) |
void |
executeCommand(String command) |
void |
executeCommandExpectingFailure(String command) |
void |
executeCommandExpectingFailureFromRelativeLocation(String command,
String relativePath) |
void |
executeCommandFromRelativeLocation(String command,
String relativePath) |
void |
move(String from,
String to) |
void |
verifyCommandExecutionResultContains(String expectedCommandExecutionResult) |
void |
verifyCommandExecutionResultDoesNotContain(String expectedCommandExecutionResult) |
void |
verifyCommandExecutionResultIs(String expectedCommandExecutionResult) |
void |
verifyTemporaryDirectoryHasFiles(List<String> names) |
public CommandLineSteps(PropertyStore propertyStore, PlaceholderResolver placeholderResolver)
@When(value="^(?:we|he|she|the user|a user) executes \"([^\"]+)\", it should fail$") public void executeCommandExpectingFailure(String command)
@When(value="^(?:we|he|she|the user|a user) executes \"([^\"]+)\" from \"(.+)\", it should fail$") public void executeCommandExpectingFailureFromRelativeLocation(String command, String relativePath)
@When(value="^(?:we|he|she|the user|a user) moves \"(.+)\" to \"(.+)\" in the temporary directory$") public void move(String from, String to) throws IOException
IOException@When(value="^(?:we|he|she|the user|a user) creates \"(.+)\" in (?:a|the) temporary directory with content:$") public void createFile(String file, String content) throws IOException
IOException@When(value="^(?:we|he|she|the user|a user) appends \"(.+)\" in the temporary directory with content:$") public void appendFile(String file, String content) throws IOException
IOException@When(value="^(?:we|he|she|the user|a user) deletes \"(.+)\" from the temporary directory$") public void delete(String file) throws IOException
IOException@When(value="^(?:we|he|she|the user|a user) executes \"(.+)\" from \"(.+)\" relative to (?:a|the) temporary directory$") public void executeCommandFromRelativeLocation(String command, String relativePath)
@When(value="^(?:we|he|she|the user|a user) executes \"(.+)\" from (?:a|the) temporary directory$") public void executeCommand(String command)
@Then(value="^the temporary directory should have the files:$") public void verifyTemporaryDirectoryHasFiles(List<String> names) throws Exception
Exception@Then(value="^the command output should not contain \"(.+)\"$") public void verifyCommandExecutionResultDoesNotContain(String expectedCommandExecutionResult) throws Exception
Exception@Then(value="^the command output should contain \"(.+)\"$") public void verifyCommandExecutionResultContains(String expectedCommandExecutionResult) throws Exception
Exception@Then(value="^the command output should be \"(.+)\"$") public void verifyCommandExecutionResultIs(String expectedCommandExecutionResult) throws Exception
Exceptionpublic void cleanUp()
throws IOException
IOExceptionCopyright © 2016. All rights reserved.