public void Then_it_is_injected_by_BDDfy() { var story = new DummyScenario().BDDfy <WhenAStoryHasUriAndImageMetadata>(); story.Metadata.StoryUri.ShouldBe("http://teststoryuri.com.au"); story.Metadata.ImageUri.ShouldBe("http://teststoryuri.com.au/storyimg.png"); }
public void When_InOrderTo_is_specified_the_InOrderTo_syntax_is_used() { var story = new DummyScenario().BDDfy<CanUseACustomStoryAttribute>(); Assert.That(story.Metadata.Narrative1, Is.EqualTo("In order to do something")); Assert.That(story.Metadata.Narrative2, Is.EqualTo("As a programmer")); Assert.That(story.Metadata.Narrative3, Is.EqualTo("I want this to work")); }
public void Then_it_is_injected_by_BDDfy() { var story = new DummyScenario().BDDfy<WhenStoryAttibuteMissesSoThatTextInSoThatProperty>(); story.Metadata.Narrative1.ShouldBe("As a programmer"); story.Metadata.Narrative2.ShouldBe("I want the missing 'So that' to be added to story metadata"); story.Metadata.Narrative3.ShouldBe("So that I don't have to duplicate it on the string"); }
public void Then_it_is_injected_by_BDDfy() { var story = new DummyScenario().BDDfy <WhenStoryAttibuteMissesSoThatTextInSoThatProperty>(); Assert.That(story.Metadata.Narrative1, Is.EqualTo("As a programmer")); Assert.That(story.Metadata.Narrative2, Is.EqualTo("I want the missing 'So that' to be added to story metadata")); Assert.That(story.Metadata.Narrative3, Is.EqualTo("So that I don't have to duplicate it on the string")); }
public void Then_it_is_injected_by_BDDfy() { var story = new DummyScenario().BDDfy<WhenStoryAttibuteMissesAsATextInAsAProperty>(); story.Metadata.Narrative1.ShouldBe("As a programmer"); story.Metadata.Narrative2.ShouldBe("I want the missing 'As a' to be added to story metadata"); story.Metadata.Narrative3.ShouldBe("So that I don't have to duplicate it on the string"); }
public void When_InOrderTo_is_specified_the_InOrderTo_syntax_is_used() { var story = new DummyScenario().BDDfy<CanUseACustomStoryAttribute>(); story.Metadata.Narrative1.ShouldBe("In order to do something"); story.Metadata.Narrative2.ShouldBe("As a programmer"); story.Metadata.Narrative3.ShouldBe("I want this to work"); }
public void Then_it_is_injected_by_BDDfy() { var story = new DummyScenario().BDDfy<WhenStoryAttibuteMissesIWantTextInIWantProperty>(); Assert.That(story.Metadata.Narrative1, Is.EqualTo("As a programmer")); Assert.That(story.Metadata.Narrative2, Is.EqualTo("I want the missing 'I want' to be added to story metadata")); Assert.That(story.Metadata.Narrative3, Is.EqualTo("So that I don't have to duplicate it on the string")); }
public void When_InOrderTo_is_specified_the_InOrderTo_syntax_is_used() { var story = new DummyScenario().BDDfy <CanUseACustomStoryAttribute>(); Assert.That(story.Metadata.Narrative1, Is.EqualTo("In order to do something")); Assert.That(story.Metadata.Narrative2, Is.EqualTo("As a programmer")); Assert.That(story.Metadata.Narrative3, Is.EqualTo("I want this to work")); }
public void When_InOrderTo_is_specified_the_InOrderTo_syntax_is_used() { var story = new DummyScenario().BDDfy <CanUseACustomStoryAttribute>(); story.Metadata.Narrative1.ShouldBe("In order to do something"); story.Metadata.Narrative2.ShouldBe("As a programmer"); story.Metadata.Narrative3.ShouldBe("I want this to work"); }
public void ScanningAScenarioWithoutArgsFromAStoryClass() { var testObject = new DummyScenario(); var scanner = new DefaultScanner(TestContext.GetContext(testObject), new ReflectiveScenarioScanner(new DefaultMethodNameStepScanner()), typeof(StoryDouble)); var story = scanner.Scan(); story.Metadata.Type.ShouldBe(typeof(StoryDouble)); story.Scenarios.Count().ShouldBe(1); story.Scenarios.Single().TestObject.ShouldBeAssignableTo <DummyScenario>(); }
public void ScanningAScenarioWithoutArgsFromAStoryClass() { var testObject = new DummyScenario(); var scanner = new DefaultScanner(TestContext.GetContext(testObject), new ReflectiveScenarioScanner(new DefaultMethodNameStepScanner())); var story = scanner.Scan(); story.Metadata.Type.ShouldBe(typeof(StoryDouble)); story.Scenarios.Count().ShouldBe(1); story.Scenarios.Single().TestObject.ShouldBeAssignableTo<DummyScenario>(); }
public void ScanningAScenarioWithoutArgsFromAStoryClass() { var testObject = new DummyScenario(); var scanner = new DefaultScanner(testObject, new ReflectiveScenarioScanner(new[] { new DefaultMethodNameStepScanner() })); var story = scanner.Scan(); Assert.That(story.Metadata, Is.Not.Null); Assert.That(story.Metadata.Type, Is.EqualTo(typeof(StoryDouble))); Assert.That(story.Scenarios.Count(), Is.EqualTo(1)); Assert.True(story.Scenarios.Single().TestObject.GetType() == typeof(DummyScenario)); }
public void Then_it_is_injected_by_BDDfy() { var story = new DummyScenario().BDDfy<WhenAStoryHasUriAndImageMetadata>(); story.Metadata.StoryUri.ShouldBe("http://teststoryuri.com.au"); story.Metadata.ImageUri.ShouldBe("http://teststoryuri.com.au/storyimg.png"); }