using Developpez.Dotnet.ComponentModel; using NUnit.Framework; namespace Developpez.Dotnet.Tests.ComponentModel { [TestFixture] public class LocalizedDescriptionAttributeTests { [Test] public void Test_LocalizedDescription() { Assert.AreEqual(Properties.Resources.TestEnum_Foo, TestEnum.Foo.GetDescription()); Assert.AreEqual(Properties.Resources.TestEnum_Bar, TestEnum.Bar.GetDescription()); Assert.AreEqual(Properties.Resources.TestEnum_Baz, TestEnum.Baz.GetDescription()); } enum TestEnum { [LocalizedDescription("TestEnum_Foo", typeof(Properties.Resources))] Foo, [LocalizedDescription("TestEnum_Bar", typeof(Properties.Resources))] Bar, [LocalizedDescription("TestEnum_Baz", typeof(Properties.Resources))] Baz } } }