Scenario: Directory exists
Given the "./Test" folder doesn't exist
And the "./Test1" folder doesn't exist
When I create the "./Test" folder
And delete the "./Test1" folder
Then I should see the "./Test" folder is available
And the "./Test1" folder is missing
Scenario: Create directory
Given the "./Test" folder doesn't exist
When I create the "./Test" folder
Then I should see the "./Test" folder is available
When I create the "./Test/test1/test2" folder
Then I should see the "./Test/test1/test2" folder is available
Scenario: Create directory (overwrite)
Given the "./Test" folder doesn't exist
When I create the "./Test" folder
Then I should see the "./Test" folder is available
When I create the "./Test/test1/test2" folder
And I create the "./Test/test1" folder (with overwrite)
Then I should see the "./Test/test1" folder is available
And the ".,Test/test1/test2" folder is missing
When I create the "./Test/test1/test2" folder
And I create the "./Test/test1" folder (without overwrite)
Then I should see the "./Test/test1" folder is available
And the "./Test/test1/test2" folder is available
Scenario: Copy directory
Given the "./Test" folder doesn't exist
And the "./Test1" folder doesn't exist
When I create the "./Test/copyTest" folder
And I copy the "./Test" folder to the "./Test1" path
Then I should see the "./Test" folder is available
And the "./Test1/copyTest" folder is available
Scenario: Delete directory
Given the "./Test" folder doesn't exist
When I create the "./Test/Test1/Test2" folder
Then I should see the "./Test/Test1/Test2" folder is available
When I delete the "./Test" folder
Then I should see the "./Test" folder is missing
Scenario: Move directory
Given the "./Test" folder doesn't exist
And the "./Test1" folder doesn't exist
When I create the "./Test/copyTest" folder
And I move the "./Test" folder to the "./Test1" path
Then I should see the "./Test" folder is missing
And the "./Test1/copyTest" folder is available
Scenario Outline: Create file
Given the "./Test.txt" file doesn't exist
And the "nop" folder doesn't exist
When I create the "./Test.txt" file
Then I should see the "./Test.txt" file is available
Scenario: Create file (overwrite)
Given the "./Test.txt" file already exists
When I fill the "./Test.txt" file with the following lines:
And I create the "./Test.txt" file
Then I should see the "./Test.txt" file content is:
When I create the "./Test.txt" file with overwriting
Then I should see the "./Test.txt" file size is 0 bytes
Scenario: Delete file
Given the "./Test.txt" file already exists
When I delete the "./Test.txt" file
Then I should see the "./Test.txt" file is missing
When I delete the "./Test.txt" file
Then I should see the "./Test.txt" file is missing
Scenario: Append text to file
Given the "./Test.txt" file doesn't exist
When I append the "./Test.txt" file with the "test line" text
Then I should see the "./Test.txt" file is available
And the "./Test.txt" file content is:
When I append the "./Test.txt" file with the "test line 2" text
Then I should see the "./Test.txt" file content is:
Line |
test line |
test line 2 |
Scenario: Write text to file
Given the "./Test.txt" file doesn't exist
When I write the "test line" text into "./Test.txt" file
Then I should see the "./Test.txt" file is available
And the "./Test.txt" file content is:
When I write the "test line 2" text into "./Test.txt" file
Then I should see the "./Test.txt" file content is:
Scenario: Get contents, head and tail
Given the "./Test.txt" file doesn't exist
When I append the "./Test.txt" file with the following lines:
Line |
test line 1 |
test line 2 |
test line 3 |
test line 4 |
test line 5 |
Then I should see the first 3 lines of the "./Test.txt" file are:
Line |
test line 1 |
test line 2 |
test line 3 |
And the last 2 lines of the "./Test.txt" file are:
Line |
test line 4 |
test line 5 |
And the lines from 2 of the "./Test.txt" file are:
Line |
test line 2 |
test line 3 |
test line 4 |
test line 5 |
And the lines from 2 to 4 of the "./Test.txt" file are:
Line |
test line 2 |
test line 3 |
test line 4 |
Scenario: File size
Given the "./Test.txt" file doesn't exist
When I append the "./Test.txt" file with the "test line" text
Then I should see the "./Test.txt" file size is 11 bytes
When I append the "./Test.txt" file with the "test line2" text
Then I should see the "./Test.txt" file size is 23 bytes
When I delete the "./Test.txt" file
Then I should see the "./Test.txt" file size is -1 bytes