public void GetZonesByIso_Invalid() { // Invalid var c = TimeZones.GetZonesByIso("INVALID"); Assert.Null(c); }
public void GetZonesByIso(string iso, int result) { var c = TimeZones.GetZonesByIso(iso); Assert.Equal(result, c.Count()); foreach (var item in c) { Assert.NotEmpty(item.Human); Assert.NotEmpty(item.Territory); Assert.NotEmpty(item.Type); Assert.NotEqual(DateTime.UtcNow, item.DateTime); } }
/// <summary> /// Get Timezones for this Country /// </summary> /// <returns></returns> public IEnumerable <Models.TimeZoneModel> GetTimeZones() { return(TimeZones.GetZonesByIso(this.ISO2)); }