コード例 #1
0
        public void should_find_by_zip_code()
        {
            var result = _sut.GetFromZip("08610");

            result.City.ShouldEqual("Trenton");
            result.State.ShouldEqual("New Jersey");
        }
コード例 #2
0
        public GeoCodingResult GetFromZip(string zip)
        {
            var key = MakeKey(zip);

            return(Get(key, () => _decoratedService.GetFromZip(zip)));
        }
コード例 #3
0
        //[Route("api/zipcode/{zipcode}", Name = "postalCodeSearch")]
        public CoordinateViewModel FindZip(string zipCode)
        {
            var result = _geoCodingService.GetFromZip(zipCode);

            return(_viewModelFactory.Create(result));
        }