public void Should_handle_missing_step_definition_regex_template()
        {
            var sut = new FileBasedSkeletonTemplateProviderStub(@">>>other", "missing");

            var result = sut.GetStepDefinitionTemplate(ProgrammingLanguage.CSharp, true);
            result.Should().Be("missing");
        }
Ejemplo n.º 2
0
        public void Should_handle_missing_step_definition_template()
        {
            var sut = new FileBasedSkeletonTemplateProviderStub(@">>>other", "missing");

            var result = sut.GetStepDefinitionTemplate(ProgrammingLanguage.CSharp, false);

            result.ShouldEqual("missing");
        }
Ejemplo n.º 3
0
        public void Should_handle_invalid_template_file_missing_title()
        {
            var sut = new FileBasedSkeletonTemplateProviderStub(@">>>
foo");

            Should.Assertions.Assert.Throws <SpecFlowException>(
                () => sut.GetStepDefinitionClassTemplate(ProgrammingLanguage.CSharp));
        }
        public void Should_parse_step_definition_template()
        {
            var sut = new FileBasedSkeletonTemplateProviderStub(@">>>CSharp/StepDefinition
mytemplate
>>>other");

            var result = sut.GetStepDefinitionTemplate(ProgrammingLanguage.CSharp, false);
            result.Should().Be("mytemplate" + Environment.NewLine);
        }
Ejemplo n.º 5
0
        public void Should_parse_step_definition_template()
        {
            var sut = new FileBasedSkeletonTemplateProviderStub(@">>>CSharp/StepDefinition
mytemplate
>>>other");

            var result = sut.GetStepDefinitionTemplate(ProgrammingLanguage.CSharp, false);

            result.ShouldEqual("mytemplate" + Environment.NewLine);
        }
        public void Should_handle_invalid_template_file_missing_title()
        {
            var sut = new FileBasedSkeletonTemplateProviderStub(@">>>
foo");

            Assert.Throws<SpecFlowException>(
                () => sut.GetStepDefinitionClassTemplate(ProgrammingLanguage.CSharp));
        }