public void ShowProject(IEnumerable <string> expectedTitles)
        {
            //Act
            var shownProject = _result.Model <IEnumerable <PROPERTY> >();

            //Assert
            ProjectAssertions.HomeScreenShouldShow(shownProject, expectedTitles);
        }
        public void ShowProject(string expectedTitlesString)
        {
            var expectesTitles = from t in expectedTitlesString.Split(',')
                                 select t.Trim().Trim('\'');

            var ShowProject = _state.ActionResult.Model <IEnumerable <PROPERTY> >();

            ProjectAssertions.HomeScreenShouldShow(ShowProject, expectesTitles);
        }
        public void ShowListProjectByPrice(Table showProject)
        {
            //Arrange
            var expectedProjects = showProject.Rows.Select(r => r["Price"]);
            //Actual
            var actualProjects = _result.Model <IEnumerable <PROPERTY> >();

            //Assert
            ProjectAssertions.HomeScreenShouldShow(actualProjects, expectedProjects);
        }
        public void ShowListProject(Table expectedProject)
        {
            //Arrange
            var expectedTitles = expectedProject.Rows.Select(r => r["Title"]);

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

            //Assert
            ProjectAssertions.HomeScreenShouldShowInOrder(ShownProjects, expectedTitles);
        }
Esempio n. 5
0
        public void SaveProject()
        {
            //Arange
            var exProperty = ScenarioContext.Current.Get <PROPERTY>("Property");

            //Act
            var actProperty = db.PROPERTies.Single(x => x.PropertyName.Equals(exProperty.PropertyName));

            //Assert
            ProjectAssertions.HomeScreenShouldShow(exProperty, actProperty);
        }
        public void ShowListOfProject(Table showProject)
        {
            //Arrange
            var expectedProjects = showProject.Rows.Select(r => r["PropertyName"]);
            //Actual
            var actualProjects = ScenarioContext.Current.Get <IEnumerable <PROPERTY> >("agencyProperty");

            //var actualProjects = result;

            //Assert
            ProjectAssertions.HomeScreenShouldShow(actualProjects, expectedProjects);
        }
Esempio n. 7
0
        public void ShouldShowProjects(Table expectedProperties)
        {
            //Arrange
            var expectedProjects = expectedProperties.Rows.Select(r => r["Property_Name"]);


            //Act
            var actualProjects = _result.Model <IEnumerable <PPCRental.Models.PROPERTY> >();

            //Assert
            ProjectAssertions.HomeScreenShouldShow(actualProjects, expectedProjects);
        }
        public void ThenToiSeThayDuocDanhSachCacDuAnCuaToi(Table expectedProject)
        {
            //Arrange
            //var expectedTitles = expectedProject.Rows[0]["PropertyName"];
            var expectedTitles = expectedProject.Rows.Select(r => r["PropertyName"]);
            //Action
            var showProject = from row in Browser.FindElements(By.XPath("//table/tbody/tr"))
                              let propertyName = row.FindElement(By.Id("PropertyName")).Text
                                                 select new PROPERTY {
                PropertyName = propertyName
            };

            //Assert
            ProjectAssertions.HomeScreenShouldShow(showProject, expectedTitles);
        }