def test_Scenario_equality(self):
        name = 'NAME2'
        tags = ['TAGS']
        scenario = Scenario(name, False, tags)
        scenario1 = Scenario(name, False, tags)

        self.assertEqual(scenario, scenario1)
    def test_create_execution_context_from(self):
        message = Message()
        spec_name = 'SPEC_NAME'
        spec_file_name = 'SPEC_FILE_NAME'
        scenario_name = 'SCENARIO_NAME'
        step_name = 'STEP_NAME'

        message.executionStartingRequest.\
            currentExecutionInfo.currentSpec.name = spec_name
        message.executionStartingRequest.\
            currentExecutionInfo.currentSpec.fileName = spec_file_name
        message.executionStartingRequest.\
            currentExecutionInfo.currentSpec.isFailed = True
        message.executionStartingRequest.\
            currentExecutionInfo.currentScenario.name = scenario_name
        message.executionStartingRequest.\
            currentExecutionInfo.currentScenario.isFailed = False
        message.executionStartingRequest.\
            currentExecutionInfo.currentStep.step.actualStepText = step_name
        message.executionStartingRequest.\
            currentExecutionInfo.currentStep.isFailed = True

        specification = Specification(spec_name, spec_file_name, True, [])
        scenario = Scenario(scenario_name, False, [])
        step = Step(step_name, True)

        context = ExecutionContext(specification, scenario, step)

        expected_execution_context = create_execution_context_from(
            message.executionStartingRequest.currentExecutionInfo)
        self.assertEqual(expected_execution_context, context)
    def test_Scenario(self):
        name = 'NAME3'
        tags = ['TAGS']
        scenario = Scenario(name, False, tags)

        self.assertEqual(scenario.name, name)
        self.assertEqual(scenario.is_failing, False)
        self.assertEqual(scenario.tags, tags)
    def test_ExecutionContextTests_equality(self):
        name = 'NAME'
        file_name = 'FILE_NAME'
        tags = ['TAGS']
        specification = Specification(name, file_name, False, tags)
        scenario = Scenario(name, False, tags)
        step = Step(name, False)

        context = ExecutionContext(specification, scenario, step)
        context1 = ExecutionContext(specification, scenario, step)

        self.assertEqual(context, context1)