コード例 #1
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_BelongTos_ShouldReturnNull_When404ExceptionIsThrown()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.BelongTos(1, AppId);

                places.ShouldBeNull();
            }
        }
コード例 #2
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Types_ShouldReturnResults()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var placeTypes = geoPlanetClient.Types(AppId);

                placeTypes.ShouldNotBeNull();
            }
        }
コード例 #3
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_BelongTos_ShouldReturnResults_ForWoeId2380358()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.BelongTos(23424833, AppId, RequestView.Long);

                places.ShouldNotBeNull();
            }
        }
コード例 #4
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Parent_ShouldReturnNull_When404ExceptionIsThrown()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var place = geoPlanetClient.Parent(1, AppId);

                place.ShouldBeNull();
            }
        }
コード例 #5
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Ancestors_ShouldReturnResults_ForWoeId2380358()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.Ancestors(2380358, AppId);

                places.ShouldNotBeNull();
            }
        }
コード例 #6
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_States_ShouldReturnNull_ForWoeId2514815()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var counties = geoPlanetClient.Counties(2514815, AppId);

                counties.ShouldBeNull();
            }
        }
コード例 #7
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Places_ShouldReturnNull_WhenArgumentExceptionIsThrown()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.Places("", AppId);

                places.ShouldBeNull();
            }
        }
コード例 #8
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Concordance_WithStringId_ShouldReturnResults()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var response = geoPlanetClient.Concordance(ConcordanceNamespace.Iso, "DE", AppId);

                response.ShouldNotBeNull();
            }
        }
コード例 #9
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Concordance_ShouldReturnNull_When404ExceptionIsThrown()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var response = geoPlanetClient.Concordance(ConcordanceNamespace.GeoNames, 6295630, AppId);

                response.ShouldBeNull();
            }
        }
コード例 #10
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Type_ShouldReturnNull_WhenTypeDoesNotExist()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var placeType = geoPlanetClient.Type(int.MaxValue, AppId, RequestView.Long);

                placeType.ShouldBeNull();
            }
        }
コード例 #11
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Ancestors_ShouldReturnNull_When404ExceptionIsThrown()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.Ancestors(23424802, AppId);

                places.ShouldBeNull();
            }
        }
コード例 #12
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Parent_ShouldReturn1Result_ForWoeId2380358()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var place = geoPlanetClient.Parent(2380358, AppId);

                place.ShouldNotBeNull();
            }
        }
コード例 #13
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_States_ShouldReturnNull_ForWoeId28289409()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var states = geoPlanetClient.States(28289409, AppId);

                states.ShouldBeNull();
            }
        }
コード例 #14
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Countries_ShouldReturnResults()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var countries = geoPlanetClient.Countries(AppId);

                countries.ShouldNotBeNull();
            }
        }
コード例 #15
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Places_ShouldReturnEmpty_WhenNoResultsAreFound()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.Places("asdfdfmdlfjkdlajsdlfasdfjdjfdlajlsdflasdjf", AppId);

                places.ShouldNotBeNull();
                places.Items.Count.ShouldEqual(0);
            }
        }
コード例 #16
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Places_ShouldReturnMoreThan1Result_ForQuery_Ca()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.Places("CA", AppId);

                places.ShouldNotBeNull();
                places.Items.Count.ShouldBeInRange(2, int.MaxValue);
            }
        }
コード例 #17
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Places_ShouldReturnAtLeast1Result_ForQuery_Sfo()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var places = geoPlanetClient.Places("SFO", AppId);

                places.ShouldNotBeNull();
                places.Items.Count.ShouldBeInRange(1, int.MaxValue);
            }
        }
コード例 #18
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Concordance_WithIntId_ShouldReturnResults()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var response = geoPlanetClient.Concordance(ConcordanceNamespace.WoeId, 2380358, AppId);

                response.ShouldNotBeNull();
                response.ForNamespace.ShouldEqual(ConcordanceNamespace.WoeId);
            }
        }
コード例 #19
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Level2Admins_ShouldReturn58Results_ForWoeId2347563()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var level2Admins = geoPlanetClient.Level2Admins(2347563, AppId);

                level2Admins.ShouldNotBeNull();
                level2Admins.Items.ShouldNotBeNull();
                level2Admins.Items.Count.ShouldEqual(58);
            }
        }
コード例 #20
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Level1Admins_ShouldReturn13Results_ForWoeId23424775()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var level1Admins = geoPlanetClient.Level1Admins(23424775, AppId);

                level1Admins.ShouldNotBeNull();
                level1Admins.Items.ShouldNotBeNull();
                level1Admins.Items.Count.ShouldEqual(13);
            }
        }
コード例 #21
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_States_ShouldReturn32Results_ForWoeId23424781()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var states = geoPlanetClient.States(23424781, AppId);

                states.ShouldNotBeNull();
                states.Items.ShouldNotBeNull();
                states.Items.Count.ShouldEqual(32);
            }
        }
コード例 #22
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Continents_ShouldReturn7Results()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var continents = geoPlanetClient.Continents(AppId);

                continents.ShouldNotBeNull();
                continents.Items.ShouldNotBeNull();
                continents.Items.Count.ShouldEqual(7);
            }
        }
コード例 #23
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Counties_ShouldReturn88Results_ForWoeId2347594()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var counties = geoPlanetClient.Counties(2347594, AppId);

                counties.ShouldNotBeNull();
                counties.Items.ShouldNotBeNull();
                counties.Items.Count.ShouldEqual(88);
            }
        }
コード例 #24
0
        public void Yahoo_GeoPlanet_GeoPlanetClient_Type_ShouldReturn1Result_ForType35()
        {
            using (var geoPlanetClient = new GeoPlanetClient())
            {
                var placeType = geoPlanetClient.Type(35, AppId, RequestView.Long);

                placeType.ShouldNotBeNull();
                placeType.Code.ShouldEqual(35);
                placeType.Name.ShouldNotBeNull();
                placeType.Description.ShouldNotBeNull();
                placeType.Uri.ShouldNotBeNull();
                placeType.Language.ShouldNotBeNull();
            }
        }