Beispiel #1
0
        public void YahooPlaceFinderBoss()
        {
            string consumerKey    = BossKey;
            string consumerSecret = BossSecret;
            string yahooappid     = YahooAppId;



            YahooPlaceFinderBossConfig ypc =
                new YahooPlaceFinderBossConfig()
                .SetConsumerKey(consumerKey)
                .SetSecret(consumerSecret)
                .SetKey(yahooappid);

            YahooPlaceFinderBoss g = new YahooPlaceFinderBoss(ypc);

            var Expected = new
            {
                Latitude  = 30.267599,
                Longitude = -97.742981
            };
            IGeoCodeResult Target = g.GetCoordinates("Austin, TX");

            Assert.AreEqual(Expected.Latitude, Target.Latitude);
            Assert.AreEqual(Expected.Longitude, Target.Longitude);
        }
Beispiel #2
0
        public void GeoCoderDefault()
        {
            // Google Assert
            GeoCoder gc       = new GeoCoder();
            var      Expected = new{
                Latitude  = 30.267153,
                Longitude = -97.7430608
            };


            IGeoCodeResult Target = gc.GetCoordinates("Austin, TX");

            Assert.AreEqual(Expected.Latitude, Target.Latitude);
            Assert.AreEqual(Expected.Longitude, Target.Longitude);
        }