예제 #1
0
        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);
            }
        }
예제 #2
0
 public override object Convert(DayOfWeek value) => EnumValues.GetCustomDayString(value);