# Path: cli_bdd/behave/steps/file.py

# 
# Path: cli_bdd/core/steps/file.py
# class CopyFileOrDirectory(StepBase):
# class MoveFileOrDirectory(StepBase):
# class CreateDirectory(StepBase):
# class ChangeDirectory(StepBase):
# class CreateFileWithContent(StepBase):
# class CreateFileWithMultilineContent(StepBase):
# class CheckFileOrDirectoryExist(StepBase):
#     def step(self, file_or_directory, source, destination):
#     def step(self, file_or_directory, source, destination):
#     def step(self, dir_path):
#     def step(self, dir_path):
#     def step(self, file_path, file_content):
#     def step(self, file_path):
#     def step(self, file_or_directory, path, should_not=None):
# 
# Path: cli_bdd/lettuce/steps/file.py



import os
import shutil
import tempfile
from hamcrest import assert_that, calling, equal_to, is_not, raises
from cli_bdd.behave.steps import file as behave_file
from cli_bdd.core.steps.file import base_steps
from cli_bdd.lettuce.steps import file as lettuce_file
from testutils import (
    BehaveStepsTestMixin,
    LettuceStepsTestMixin,
    StepsSentenceRegexTestMixin,
    TestCase
)
        self.execute_module_step(
            'create_file_with_content',
            kwargs={
                'file_path': file_path,
                'file_content': content,
            }
        )
        assert_that(os.path.exists(file_path), equal_to(True))
        assert_that(open(file_path).read(), equal_to(content))

        # test when file already exists
        self.execute_module_step(
            'create_file_with_content',
            kwargs={
                'file_path': file_path,
                'file_content': content + '1',
            }
        )
        assert_that(os.path.exists(file_path), equal_to(True))
        assert_that(open(file_path).read(), equal_to(content + '1'))

    def test_create_file_with_multiline_content(self):
        file_path = os.path.join(tempfile.gettempdir(), 'file.txt')
        content = 'hello world'

        try:
            os.remove(file_path)
        except OSError:
            pass


# Path: cli_bdd/behave/steps/file.py

# 
# Path: cli_bdd/core/steps/file.py
# class CopyFileOrDirectory(StepBase):
# class MoveFileOrDirectory(StepBase):
# class CreateDirectory(StepBase):
# class ChangeDirectory(StepBase):
# class CreateFileWithContent(StepBase):
# class CreateFileWithMultilineContent(StepBase):
# class CheckFileOrDirectoryExist(StepBase):
#     def step(self, file_or_directory, source, destination):
#     def step(self, file_or_directory, source, destination):
#     def step(self, dir_path):
#     def step(self, dir_path):
#     def step(self, file_path, file_content):
#     def step(self, file_path):
#     def step(self, file_or_directory, path, should_not=None):
# 
# Path: cli_bdd/lettuce/steps/file.py



# Path: tests/unit/steps/file/tests.py
import os
import shutil
import tempfile
from hamcrest import assert_that, calling, equal_to, is_not, raises
from cli_bdd.behave.steps import file as behave_file
from cli_bdd.core.steps.file import base_steps
from cli_bdd.lettuce.steps import file as lettuce_file
from testutils import (
    BehaveStepsTestMixin,
    LettuceStepsTestMixin,
    StepsSentenceRegexTestMixin,
    TestCase
)

        self.execute_module_step(
            'create_file_with_content',
            kwargs={
                'file_path': file_path,
                'file_content': content,
            }
        )
        assert_that(os.path.exists(file_path), equal_to(True))
        assert_that(open(file_path).read(), equal_to(content))

        # test when file already exists
        self.execute_module_step(
            'create_file_with_content',
            kwargs={
                'file_path': file_path,
                'file_content': content + '1',
            }
        )
        assert_that(os.path.exists(file_path), equal_to(True))
        assert_that(open(file_path).read(), equal_to(content + '1'))

    def test_create_file_with_multiline_content(self):
        file_path = os.path.join(tempfile.gettempdir(), 'file.txt')
        content = 'hello world'

        try:
            os.remove(file_path)
        except OSError:
            pass


        self.execute_module_step(