public void GetRegionTimeZonesTest() { var timezones = TimeZone.GetTimeZones(USystemTimeZoneType.Any, "PL"); Assert.AreEqual(2, timezones.Count()); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Poland")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Europe/Warsaw")); }
public void GetOffsetTimeZonesTest() { var timezones = TimeZone.GetTimeZones(USystemTimeZoneType.Any, null, -1 * 3600 * 1000); Assert.GreaterOrEqual(timezones.Count(), 4); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Atlantic/Azores")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "America/Scoresbysund")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Atlantic/Cape_Verde")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Etc/GMT+1")); }
public void GetTimeZonesTest() { var timezones = TimeZone.GetTimeZones(); Assert.GreaterOrEqual(timezones.Count(), 400); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Asia/Seoul")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Europe/London")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Etc/GMT-10")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Etc/GMT+3")); Assert.AreEqual(1, timezones.Count(tz => tz.Id == "Etc/UTC")); }