Beispiel #1
0
        private List <ListeDerInspektionsroutenPo> GetListeDerInspektionsroutenPos(ListeDerInspektionsroutenGridCommand listeDerInspektionsroutenGridCommand)
        {
            //Generate Report
            BrowserDriver.GeneratReports(listeDerInspektionsroutenGridCommand, rp => BrowserDriver.InvokePostAction <ListeDerInspektionsroutenController, ListeDerInspektionsroutenGridCommand>((c, r) => c.GetReport(r), rp, false));

            //Assert on Po-s
            return(GetPos <ListeDerInspektionsroutenPo>());
        }
Beispiel #2
0
        public void TestWithNoFilter()
        {
            var listeDerInspektionsroutenGridCommand = new ListeDerInspektionsroutenGridCommand();

            var pos = GetListeDerInspektionsroutenPos(listeDerInspektionsroutenGridCommand);

            Assert.AreEqual(2, pos.Count);
            AssertPoIsTheExpected(pos, "IR01", "SA01", EigentuemerTyp.Gemeinde, null);
            AssertPoIsTheExpected(pos, "IR02", "SA02", EigentuemerTyp.Kanton, new DateTime(2010, 10, 10));
        }
Beispiel #3
0
        public void TestWithEigentuemerFilter()
        {
            var listeDerInspektionsroutenGridCommand = new ListeDerInspektionsroutenGridCommand {
                Eigentuemer = (int)EigentuemerTyp.Gemeinde
            };

            var pos = GetListeDerInspektionsroutenPos(listeDerInspektionsroutenGridCommand);

            Assert.AreEqual(1, pos.Count);
            AssertPoIsTheExpected(pos, "IR01", "SA01", EigentuemerTyp.Gemeinde, null);
        }
Beispiel #4
0
        public void TestWithErfassungPeriodFilter()
        {
            var filter = new ListeDerInspektionsroutenGridCommand()
            {
                ErfassungsPeriodId = GetClosedErfassungPeriodId()
            };

            var pos = GetListeDerInspektionsroutenPos(filter);

            Assert.AreEqual(1, pos.Count);
            AssertPoIsTheExpected(pos, "IR03", "SA03", EigentuemerTyp.Korporation, null);
        }
Beispiel #5
0
        public void TestWithInspektionsrouteInInspektionBisVonFilter()
        {
            var listeDerInspektionsroutenGridCommand = new ListeDerInspektionsroutenGridCommand
            {
                InspektionsrouteInInspektionBisVon = new DateTime(2010, 1, 1),
                InspektionsrouteInInspektionBisBis = new DateTime(2010, 11, 11)
            };

            var pos = GetListeDerInspektionsroutenPos(listeDerInspektionsroutenGridCommand);

            Assert.AreEqual(1, pos.Count);
            AssertPoIsTheExpected(pos, "IR02", "SA02", EigentuemerTyp.Kanton, new DateTime(2010, 10, 10));
        }
Beispiel #6
0
        public void TestWithAllFilter()
        {
            var listeDerInspektionsroutenGridCommand = new ListeDerInspektionsroutenGridCommand
            {
                //Strassenname = "SA02", //SQLite dos not support .Contains(.ToLower())
                Inspektionsroutename            = "R02",
                InspektionsrouteInInspektionBei = "R02".GetInInspektionBei(),
                Eigentuemer = (int)EigentuemerTyp.Kanton,
                InspektionsrouteInInspektionBisVon = new DateTime(2010, 1, 1),
                InspektionsrouteInInspektionBisBis = new DateTime(2010, 11, 11)
            };

            var pos = GetListeDerInspektionsroutenPos(listeDerInspektionsroutenGridCommand);

            Assert.AreEqual(1, pos.Count);
            AssertPoIsTheExpected(pos, "IR02", "SA02", EigentuemerTyp.Kanton, new DateTime(2010, 10, 10));
        }