示例#1
0
        public void GetTimeZones()
        {
            var services = new TimeZoneService();
            var tzs      = services.GetTimeZones();

            Assert.AreEqual(140, tzs.Count);
        }
示例#2
0
 public IHttpActionResult GetTimeZones()
 {
     try
     {
         return(Ok(_timeZoneService.GetTimeZones()));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
示例#3
0
        public void GetTimeZoneById()
        {
            var services = new TimeZoneService();
            var tzs      = services.GetTimeZones();

            var timeZone = tzs[5];

            var tzLookup = services.GetTimeZoneById(timeZone.Id);

            Assert.IsNotNull(tzLookup);
            Assert.AreEqual(timeZone.DisplayName, tzLookup.DisplayName);
        }