Пример #1
0
        public void ShowProperty(IEnumerable <string> expectedTitles)
        {
            //Act
            var shownBooks = _result.Model <IEnumerable <PROPERTY> >();

            //Assert
            PropertyAssertions.HomeScreenShouldShow(shownBooks, expectedTitles);
        }
Пример #2
0
        public void ShowList(Table expectednameList)
        {
            //Arrange
            var expected = expectednameList.Rows.Select(x => x["PropertyName"]);

            var ShownName = _result.Model <IEnumerable <PROPERTY> >();

            //Assert
            PropertyAssertions.HomeScreenShouldShow(ShownName, expected);
        }
Пример #3
0
        public void ShowProperty(Table expectedProject)
        {
            //Arrange
            var expectedTitles = expectedProject.Rows.Select(r => r["Title"]);

            //Action
            var ShowProperty = _state.ActionResult.Model <IEnumerable <PROPERTY> >();

            //Assert
            PropertyAssertions.HomeScreenShouldShowInOrder(ShowProperty, expectedTitles);
        }
Пример #4
0
        public void ShowProperty(string expectedTitlesString)
        {
            //Arrange
            var expectedTitles = from t in expectedTitlesString.Split(',')
                                 select t.Trim().Trim('\'');

            //Action
            var ShowProperty = _state.ActionResult.Model <IEnumerable <PROPERTY> >();

            //Assert
            PropertyAssertions.HomeScreenShouldShow(ShowProperty, expectedTitles);
        }
Пример #5
0
        public void ShowListOfProject(Table showProject)
        {
            //Arrange
            var expectedProjects = showProject.Rows.Select(r => r["PropertyName"]);

            //Action
            var result = ScenarioContext.Current.Get <IEnumerable <PROPERTY> >("Property");

            //var actualProjects = result.Model<IEnumerable<PROPERTY>>();

            //Assert
            PropertyAssertions.HomeScreenShouldShow(result, expectedProjects);
        }
        public void ThenTheResultShouldShowTheListOfProjectOnTheScreen(string p0)
        {
            var expectedPropertyName = p0.Split(',').Select(t => t.Trim().Trim('\''));

            driver.SwitchTo().DefaultContent();

            string descriptionTextPath = "//table/tbody/tr";
            var    listProperty        = from row in driver.FindElements(By.XPath(descriptionTextPath))
                                         let nameProperty = row.FindElement(By.Id("pName")).Text
                                                            select new PROPERTY {
                PropertyName = nameProperty
            };

            PropertyAssertions.FoundPropertyName(listProperty, expectedPropertyName);
        }