Exemple #1
0
        public void GetLocationCoordinateInvalidID()
        {
            FlickrPhotoController controller = new FlickrPhotoController(_mockLocationRepository.Object, _mockFlickrPhotoRepository.Object, _FourSquareService, _FlickrService);

            controller.ControllerContext = mockControllerContext.Object;

            var result = controller.GetLocationCoordinate("99999");

            Assert.AreEqual(null, result);
        }
Exemple #2
0
        public void GetLocationCoordinate()
        {
            FlickrPhotoController controller = new FlickrPhotoController(_mockLocationRepository.Object, _mockFlickrPhotoRepository.Object, _FourSquareService, _FlickrService);

            controller.ControllerContext = mockControllerContext.Object;
            var result = controller.GetLocationCoordinate("123456");

            Assert.AreEqual(18.4173774719238, double.Parse(result.Longitude));
            Assert.AreEqual(-33.9281208675072, double.Parse(result.Latitude));
        }