Пример #1
0
        // separate asserts for different expectations
        public void AssertListsGeneration(TestData testData)
        {
            var generatedText = GeneratedLoremIpsum.Text;
            var generatedTextStartsWithDefault = generatedText.StartsWith(testData.LoremIpsum.DefaultText);
            var generatedLists = GeneratedLoremIpsum.FindElements(By.CssSelector("ul")).Count.ToString();

            generatedLists.Should().Be(testData.LoremIpsum.Amount);
            generatedTextStartsWithDefault.Should().Be(testData.LoremIpsum.StartWithDefaultText);
        }
Пример #2
0
        // separate asserts for different expectations, both using LoremIpsum model
        public void AssertParagraphsGeneration(LoremIpsum loremIpsum)
        {
            var generatedText = GeneratedLoremIpsum.Text;
            var generatedTextStartsWithDefault = generatedText.StartsWith(loremIpsum.DefaultText);
            var generatedParagraphs            = GeneratedLoremIpsum.FindElements(By.CssSelector("p")).Count.ToString();

            generatedParagraphs.Should().Be(loremIpsum.Amount);
            generatedTextStartsWithDefault.Should().Be(loremIpsum.StartWithDefaultText);
        }