Example #1
0
        public void EnumDisplayUnit()
        {
            TestEnum test  = TestEnum.None;
            TestEnum test1 = TestEnum.True;
            TestEnum test2 = TestEnum.False;

            //""
            test.ToDisplay();
            //"正确"
            test1.ToDisplay();
            //"错误"
            test2.ToDisplay();

            Assert.IsTrue(true);
        }
Example #2
0
 public void EnumReturnsCorrectDisplayValue(TestEnum value, string expected)
 {
     Assert.Equal(value.ToDisplay(), expected, StringComparer.OrdinalIgnoreCase);
 }