Exemplo n.º 1
0
 public async Task <ActionResult <Dictionary <long?, string> > > SetPreferencesAndSearch(
     [Bind("NazwaObiektu,NrRbdh,Lokalizacja,Status,EurefX1,EurefX2,EurefY1,EurefY2,GlebokoscZwierciadla1,GlebokoscZwierciadla2,KlasaFiltracji,Filtracja1,Filtracja2,PowierzchniaZieleni1,PowierzchniaZieleni2")]
     OdwiertSearch preferences)
 {
     _preferences = preferences;
     return(await Search());
 }
Exemplo n.º 2
0
        public async Task SearchByY()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                EurefY1 = 575071, EurefY2 = 575072
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(608));
            Assert.IsFalse(result.Value.ContainsKey(688));
        }
Exemplo n.º 3
0
        public async Task SearchByFiltering()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                Filtracja1 = (decimal)0.001, Filtracja2 = (decimal)0.01
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(101));
            Assert.IsFalse(result.Value.ContainsKey(50));
        }
Exemplo n.º 4
0
        public async Task SearchByDepth()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                GlebokoscZwierciadla1 = -2, GlebokoscZwierciadla2 = -1
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(51));
            Assert.IsFalse(result.Value.ContainsKey(50));
        }
Exemplo n.º 5
0
        public async Task SearchByGreeneryArea()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                PowierzchniaZieleni1 = 10000, PowierzchniaZieleni2 = 15000
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(46));
            Assert.IsFalse(result.Value.ContainsKey(707));
        }
Exemplo n.º 6
0
        public async Task SearchByDistrict()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                Lokalizacja = "7"
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(701));
            Assert.IsFalse(result.Value.ContainsKey(707));
        }
Exemplo n.º 7
0
        public async Task SearchByStatus()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                Status = "Monitoringowy"
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(707));
            Assert.IsFalse(result.Value.ContainsKey(705));
        }
Exemplo n.º 8
0
        public async Task SearchByName()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                NazwaObiektu = "Odwodnienie SA-4"
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(703));
            Assert.IsFalse(result.Value.ContainsKey(701));
        }
Exemplo n.º 9
0
        public async Task SearchByRbdh()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                NrRbdh = 9730234
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(50));
            Assert.IsFalse(result.Value.ContainsKey(123));
        }
Exemplo n.º 10
0
        public async Task SearchByX()
        {
            OdwiertSearch preferences = new OdwiertSearch {
                EurefX1 = 241669, EurefX2 = 241670
            };
            ActionResult <Dictionary <long?, string> > result = await _searchController.SetPreferencesAndSearch(preferences);

            Assert.IsTrue(result.Value.ContainsKey(707));
            Assert.IsFalse(result.Value.ContainsKey(706));
        }