public void InvalidTzName() { string tzName = "Lunar Standard Time"; var html = CreateHtmlHelper(new ViewDataDictionary()); SrkHtmlExtensions.SetTimezone(html, tzName); }
public void EmptyTzName() { string tzName = string.Empty; var html = CreateHtmlHelper(new ViewDataDictionary()); SrkHtmlExtensions.SetTimezone(html, tzName); }
public void WorksWithTzObject2() { var data = new ViewDataDictionary(); var tz = TimeZoneInfo.FindSystemTimeZoneById("Russia Time Zone 3"); var html = CreateHtmlHelper(data); SrkHtmlExtensions.SetTimezone(html, tz); Assert.IsNotNull(data["Timezone"]); Assert.AreEqual(tz, data["Timezone"]); }
public void WorksWithTzName1() { var data = new ViewDataDictionary(); var tzName = "Romance Standard Time"; var tz = TimeZoneInfo.FindSystemTimeZoneById(tzName); var html = CreateHtmlHelper(data); SrkHtmlExtensions.SetTimezone(html, tzName); Assert.IsNotNull(data["Timezone"]); Assert.AreEqual(tz, data["Timezone"]); }
public void GetterWorks2() { var data = new ViewDataDictionary(); var tzName = "Russia Time Zone 3"; var tz = TimeZoneInfo.FindSystemTimeZoneById(tzName); var html = CreateHtmlHelper(data); SrkHtmlExtensions.SetTimezone(html, tzName); var result = SrkHtmlExtensions.GetTimezone(html); Assert.IsNotNull(result); Assert.AreEqual(tz, result); }