public void CanConvertWhenFalseTest() { var converter = new StringEnumOrDefaultConverter <decimal>(); var result = converter.CanConvert(typeof(DayOfWeek)); Assert.IsFalse(result); }
public void WriteJsonTest() { var writer = new JsonTextWriter(TextWriter.Null); var serializer = new JsonSerializer(); var converter = new StringEnumOrDefaultConverter <DayOfWeek>(); Assert.DoesNotThrow(() => converter.WriteJson(writer, DayOfWeek.Sunday, serializer)); }
public void CanConvertWhenTrueTest() { var converter = new StringEnumOrDefaultConverter <DayOfWeek>(); var result = converter.CanConvert(typeof(DayOfWeek)); Assert.IsTrue(result); }