public void StringTemplateValueConverter_Works_With_Enum() { foreach (DayOfWeek day in Enum.GetValues(typeof(DayOfWeek))) { var values = new EnumValues { Day = day }; string expected = EnumValues.GetCustomDayString(day); string actual = StringTemplate.Format("{Day}", values); Assert.Equal(expected, actual); } }
public override object Convert(DayOfWeek value) => EnumValues.GetCustomDayString(value);