public async Task ResolveIanaTimeZone() { Assert.Throws <TimeZoneNotFoundException>(() => TimeZoneInfo.FindSystemTimeZoneById("Canada/Saskatchewan")); var plugin = new TimeZoneConverterPlugin(); await plugin.Initialize("", null); Assert.That(TimeZoneUtil.FindTimeZoneById("Canada/Saskatchewan"), Is.Not.Null); TimeZoneUtil.CustomResolver = id => null; }
public async Task ResolveIanaTimeZone() { Assert.Throws <TimeZoneNotFoundException>(() => TimeZoneUtil.FindTimeZoneById("Canada/Saskatchewan")); var plugin = new TimeZoneConverterPlugin(); await plugin.Start(); Assert.That(TimeZoneUtil.FindTimeZoneById("Canada/Saskatchewan"), Is.Not.Null); await plugin.Shutdown(); Assert.Throws <TimeZoneNotFoundException>(() => TimeZoneUtil.FindTimeZoneById("Canada/Saskatchewan")); }