Ejemplo n.º 1
0
            public void should_create_steps()
            {
                The.ScenarioFrom(Actors.ScenarioWithNoSteps.AsLocations())
                .Steps.Count.ShouldBe(0);

                The.ScenarioFrom(Actors.ScenarioWithTwoSteps.AsLocations())
                .Steps.Count.ShouldBe(2);
            }
Ejemplo n.º 2
0
            public void should_ensure_valid_identifier_fo_scenario_names()
            {
                Definition = new List <string>
                {
                    "Scenario: Scenario + Name"
                };

                The.ScenarioFrom(Definition.AsLocations())
                .Name.ShouldBe("Scenario_Name");
            }
Ejemplo n.º 3
0
            public void should_name_scenarios()
            {
                Definition = new List <string>
                {
                    "Scenario: Scenario Name"
                };

                The.ScenarioFrom(Definition.AsLocations())
                .Name.ShouldBe("ScenarioName");
            }
Ejemplo n.º 4
0
 public new void SetUp()
 {
     Scenario = The.ScenarioFrom(new List <string>
     {
         "Scenario Outline: Add",
         @"The sum of ""A"" + ""B"" should be ""C""",
         "Examples: Name",
         "[A|B|C]",
         "|0|0|0|",
         "|0|1|1|"
     }.AsLocations());
 }
Ejemplo n.º 5
0
            public void should_name_steps()
            {
                var Step = new Step();

                Given.StepParser.IgnoringArgs().StepFrom(null).Is(Step);

                Definition = new List <string>
                {
                    "Scenario: Scenario Name",
                    "Do what you like"
                };

                The.ScenarioFrom(Definition.AsLocations())
                .Steps[0].ShouldBe(Step);
            }
Ejemplo n.º 6
0
 public new void SetUp()
 {
     Scenario = The.ScenarioFrom(new List <string>
     {
         "Scenario Outline: Add",
         @"The sum of ""A"" + ""B"" should be ""C""",
         "Examples: Positives",
         "|A|B|C|",
         "|0|0|0|",
         "|0|1|1|",
         "Examples: Negatives",
         "|A |B |C |",
         "|0 |-1|-1|",
         "|-1|-1|-2|"
     }.AsLocations());
 }