public void Then_ppm_is(int l1, int l2, string id, DocString text)
        {
            var expected_lines = text.Content.Split('\n');
            var actual_lines   = ppm[id].Split('\n');

            for (int i = l1; i <= l2; ++i)
            {
                Assert.Equal(expected_lines[i - l1].Trim('\r'), actual_lines[i - 1].Trim('\r'));
            }
        }
        public void DigestScenarioStepValues_Sets_Value_As_DataTable_When_DataTable_And_Other_Args_Present()
        {
            //arrange.
            var sut = new DocStringArgument();
            var docStringContent = @"some content
+++
with multi lines
---
in it";
            var docString        = new Gherkin.Ast.DocString(null, null, docStringContent);

            //act.
            sut.DigestScenarioStepValues(new string[] { "1", "2", "3" }, docString);

            //assert.
            Assert.Same(docString, sut.Value);
        }
        public void DigestScenarioStepValues_Sets_Value_As_DocString_When_Only_DocString()
        {
            //arrange.
            var sut = new DocStringArgument();
            var docStringContent = @"some content
+++
with multi lines
---
in it";
            var docString        = new Gherkin.Ast.DocString(null, null, docStringContent);

            //act.
            sut.DigestScenarioStepValues(new string[0], docString);

            //assert.
            Assert.Same(docString, sut.Value);
        }
Esempio n. 4
0
 public void Step_With_DocString_Argument(Gherkin.Ast.DocString docString)
 {
     ReceivedDocString = docString;
 }
 public void When_DocString_Is_Expected(Gherkin.Ast.DocString docString)
 {
     ReceivedDocString = docString;
 }
Esempio n. 6
0
 private void MethodWithDocStringAndOtherArguments(int param1, string param2, DateTime param3, Gherkin.Ast.DocString docString)
 {
 }
Esempio n. 7
0
 private void MethodWithDocStringArgumentOnly(Gherkin.Ast.DocString docString)
 {
 }
Esempio n. 8
0
 public void Given_content(string id, DocString text)
 {
     content.Add(id, text.Content);
 }