Пример #1
0
        public void ConvertToExcelTest()
        {
            var converter            = new EnumConverter(typeof(TestEnum));
            var typeConverterOptions = new TypeConverterOptions {
                CultureInfo = CultureInfo.CurrentCulture
            };

            Assert.AreEqual("None", converter.ConvertToExcel(typeConverterOptions, (TestEnum)0));
            Assert.AreEqual("None", converter.ConvertToExcel(typeConverterOptions, TestEnum.None));
            Assert.AreEqual("One", converter.ConvertToExcel(typeConverterOptions, (TestEnum)1));
            Assert.AreEqual("One", converter.ConvertToExcel(typeConverterOptions, TestEnum.One));
        }