Example #1
0
        public void GetUriTest()
        {
            var request = new PlacesDetailsRequest
            {
                Key     = "abc",
                PlaceId = "abc"
            };

            var uri = request.GetUri();

            Assert.IsNotNull(uri);
            Assert.AreEqual($"/maps/api/place/details/json?key={request.Key}&placeid={request.PlaceId}&language={request.Language.ToCode()}&fields=address_component%2Cadr_address%2Calt_id%2Cformatted_address%2Cgeometry%2Cicon%2Cid%2Cname%2Cpermanently_closed%2Cphoto%2Cplace_id%2Cplus_code%2Cscope%2Ctype%2Curl%2Cutc_offset%2Cvicinity", uri.PathAndQuery);
        }
Example #2
0
        public void GetUriTest()
        {
            var request = new PlacesDetailsRequest
            {
                Key     = "abc",
                PlaceId = "abc"
            };

            var uri = request.GetUri();

            Assert.IsNotNull(uri);
            Assert.AreEqual($"/maps/api/place/details/json?key={request.Key}&placeid={request.PlaceId}&language={request.Language.ToCode()}", uri.PathAndQuery);
        }
        public void GetUriWhenExtensionsTest()
        {
            var request = new PlacesDetailsRequest
            {
                Key        = "abc",
                PlaceId    = "abc",
                Extensions = Extensions.ReviewSummary
            };

            var uri = request.GetUri();

            Assert.IsNotNull(uri);
            Assert.AreEqual($"/maps/api/place/details/json?key={request.Key}&placeid={request.PlaceId}&language={request.Language.ToCode()}&fields=address_component%2Cadr_address%2Cformatted_address%2Cgeometry%2Cicon%2Cid%2Cname%2Cphoto%2Cplace_id%2Cplus_code%2Ctype%2Curl%2Cutc_offset%2Cvicinity%2Cbusiness_status&extensions={request.Extensions.ToString().ToLower()}", uri.PathAndQuery);
        }
Example #4
0
        public void GetUriWhenExtensionsTest()
        {
            var request = new PlacesDetailsRequest
            {
                Key        = "abc",
                PlaceId    = "abc",
                Extensions = Extensions.ReviewSummary
            };

            var uri = request.GetUri();

            Assert.IsNotNull(uri);
            Assert.AreEqual($"/maps/api/place/details/json?key={request.Key}&placeid={request.PlaceId}&language={request.Language.ToCode()}&extensions={request.Extensions.ToString().ToLower()}", uri.PathAndQuery);
        }