public void InvalidTzName() { string tzName = "Lunar Standard Time"; var http = new BasicHttpContext(); SrkHttpContextExtensions.SetTimezone(http, tzName); }
public void NullTzName() { string tzName = null; var http = new BasicHttpContext(); SrkHttpContextExtensions.SetTimezone(http, tzName); }
public void EmptyTzName() { string tzName = string.Empty; var http = new BasicHttpContext(); SrkHttpContextExtensions.SetTimezone(http, tzName); }
public void WorksWithTzObject() { var tz = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time"); var http = new BasicHttpContext(); SrkHttpContextExtensions.SetTimezone(http, tz); Assert.IsNotNull(http.Items["Timezone"]); Assert.AreEqual(tz, http.Items["Timezone"]); }
public void GetterWorks() { var tzName = "Romance Standard Time"; var tz = TimeZoneInfo.FindSystemTimeZoneById(tzName); var http = new BasicHttpContext(); SrkHttpContextExtensions.SetTimezone(http, tzName); var result = SrkHttpContextExtensions.GetTimezone(http); Assert.IsNotNull(result); Assert.AreEqual(tz, result); }