コード例 #1
0
        public void GetUrl_waypoints_latlng_ex2()
        {
            var req = new DirectionRequestAccessor();

            req.Sensor      = false;
            req.Origin      = "NY";
            req.Destination = "Orlando,FL";
            req.Mode        = TravelMode.driving;      //this is default, so querystring doesn't need to contain it.

            req.AddWaypoint("NJ");
            req.AddWaypoint(new LatLng(28.452694, -80.979195));
            req.AddWaypoint("Sarasota,FL");

            Uri expected = new Uri("json?origin=NY&destination=Orlando,FL&waypoints=NJ|28.452694,-80.979195|Sarasota,FL&sensor=false", UriKind.Relative);
            Uri actual   = req.ToUri();

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void GetUrl_waypoints_latlng_ex2()
        {
            //arrange
            var expected = ParseQueryString("json?origin=NY&destination=Orlando,FL&waypoints=NJ|28.452694,-80.979195|Sarasota,FL&sensor=false");

            var req = new DirectionRequestAccessor();

            req.Sensor      = false;
            req.Origin      = "NY";
            req.Destination = "Orlando,FL";
            req.Mode        = TravelMode.driving;      //this is default, so querystring doesn't need to contain it.

            req.AddWaypoint("NJ");
            req.AddWaypoint(new LatLng(28.452694, -80.979195));
            req.AddWaypoint("Sarasota,FL");

            //act
            var actual = ParseQueryString(req.ToUri());

            //assert
            Assert.That(actual, Is.EquivalentTo(expected));
        }
コード例 #3
0
        public void GetUrl_waypoints_simple_ex1()
        {
            var req = new DirectionRequestAccessor();

            req.Sensor      = false;
            req.Origin      = "NY";
            req.Destination = "FL";
            req.Mode        = TravelMode.driving;      //this is default, so querystring doesn't need to contain it.

            req.AddWaypoint("NC");

            Uri expected = new Uri("json?origin=NY&destination=FL&waypoints=NC&sensor=false", UriKind.Relative);
            Uri actual   = req.ToUri();

            Assert.AreEqual(expected, actual);
        }
コード例 #4
0
        public void GetUrl_waypoints_simple_ex1()
        {
            //arrange
            var expected = ParseQueryString("json?origin=NY&destination=FL&waypoints=NC&sensor=false");

            var req = new DirectionRequestAccessor();

            req.Sensor      = false;
            req.Origin      = "NY";
            req.Destination = "FL";
            req.Mode        = TravelMode.driving;      //this is default, so querystring doesn't need to contain it.

            req.AddWaypoint("NC");

            //act
            var actual = ParseQueryString(req.ToUri());

            //assert
            Assert.That(actual, Is.EquivalentTo(expected));
        }
コード例 #5
0
		public void GetUrl_waypoints_latlng_ex2()
		{
			var req = new DirectionRequestAccessor();
			req.Sensor = false;
			req.Origin = "NY";
			req.Destination = "Orlando,FL";
			req.Mode = TravelMode.driving; //this is default, so querystring doesn't need to contain it.

			req.AddWaypoint("NJ");
			req.AddWaypoint(new LatLng(28.452694, -80.979195));
			req.AddWaypoint("Sarasota,FL");

			Uri expected = new Uri("json?origin=NY&destination=Orlando,FL&waypoints=NJ|28.452694,-80.979195|Sarasota,FL&sensor=false", UriKind.Relative);
			Uri actual = req.ToUri();

			Assert.AreEqual(expected, actual);
		}
コード例 #6
0
		public void GetUrl_waypoints_simple_ex1()
		{
			var req = new DirectionRequestAccessor();
			req.Sensor = false;
			req.Origin = "NY";
			req.Destination = "FL";
			req.Mode = TravelMode.driving; //this is default, so querystring doesn't need to contain it.

			req.AddWaypoint("NC");

			Uri expected = new Uri("json?origin=NY&destination=FL&waypoints=NC&sensor=false", UriKind.Relative);
			Uri actual = req.ToUri();

			Assert.AreEqual(expected, actual);

		}
コード例 #7
0
        public void GetUrl_waypoints_simple_ex1()
        {
            //arrange
            var expected = ParseQueryString("json?origin=NY&destination=FL&waypoints=NC&sensor=false");

            var req = new DirectionRequestAccessor();
            req.Sensor = false;
            req.Origin = "NY";
            req.Destination = "FL";
            req.Mode = TravelMode.driving; //this is default, so querystring doesn't need to contain it.

            req.AddWaypoint("NC");

            //act
            var actual = ParseQueryString(req.ToUri());

            //assert
            Assert.That(actual, Is.EquivalentTo(expected));
        }
コード例 #8
0
        public void GetUrl_waypoints_latlng_ex2()
        {
            //arrange
            var expected = ParseQueryString("json?origin=NY&destination=Orlando,FL&waypoints=NJ|28.452694,-80.979195|Sarasota,FL&sensor=false");

            var req = new DirectionRequestAccessor();
            req.Sensor = false;
            req.Origin = "NY";
            req.Destination = "Orlando,FL";
            req.Mode = TravelMode.driving; //this is default, so querystring doesn't need to contain it.

            req.AddWaypoint("NJ");
            req.AddWaypoint(new LatLng(28.452694, -80.979195));
            req.AddWaypoint("Sarasota,FL");

            //act
            var actual = ParseQueryString(req.ToUri());

            //assert
            Assert.That(actual, Is.EquivalentTo(expected));
        }