public void Map_Null_ReturnsNull() { var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(null); Check.That(actual).IsNull(); }
public void Map_SomeScenarioOutline_ReturnsSomeJsonScenarioOutline() { var scenarioOutline = new ScenarioOutline(); var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual).IsNotNull(); }
public void Map_NoTags_ReturnsEmptyListOfTags() { var scenarioOutline = new ScenarioOutline { Tags = null }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Tags.Count).IsEqualTo(0); }
public void Map_NoSteps_ReturnsEmtpyListOfSteps() { var scenarioOutline = new ScenarioOutline { Steps = null }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Steps.Count).IsEqualTo(0); }
public void Map_WithDescription_ReturnsSlug() { var scenarioOutline = new ScenarioOutline { Slug = "i-am-a-slug" }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Slug).IsEqualTo("i-am-a-slug"); }
public void Map_WithDescription_ReturnsDescription() { var scenarioOutline = new ScenarioOutline { Description = "Some description" }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Description).IsEqualTo("Some description"); }
public void Map_WithName_ReturnsName() { var scenarioOutline = new ScenarioOutline { Name = "Some name" }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Name).IsEqualTo("Some name"); }
public void Map_Always_ReturnsNullFeature() { var scenarioOutline = new ScenarioOutline { Feature = new Feature() }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Feature).IsNull(); }
public void Map_WithResult_ReturnsResult() { var scenarioOutline = new ScenarioOutline { Result = TestResult.Passed }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Result.WasExecuted).IsTrue(); Check.That(actual.Result.WasSuccessful).IsTrue(); }
public void Map_WithTags_ReturnsTags() { var scenarioOutline = new ScenarioOutline { Tags = new List <string>() { "tag1", "tag2" } }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Tags).ContainsExactly("tag1", "tag2"); }
public void Map_Example_ReturnsExample() { var scenarioOutline = new ScenarioOutline { Examples = new List <Example> { new Example { Name = "Name of the example" } } }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Examples[0].Name).IsEqualTo("Name of the example"); }
public void Map_WithSteps_ReturnsSteps() { var scenarioOutline = new ScenarioOutline { Steps = new List <Step> { new Step { Name = "I perform a step" } } }; var mapper = CreateMapper(); JsonScenarioOutline actual = mapper.Map(scenarioOutline); Check.That(actual.Steps[0].Name).IsEqualTo("I perform a step"); }