public void GetCustomAttributeDescription()
        {
            // Type
            var @thisClass = new System_Object_GetCustomAttributeDescription_TestClass();
            var @thisEnum = System_Object_GetCustomAttributeDescription_TestEnum.Test;

            // Exemples
            var result1 = @thisClass.GetCustomAttributeDescription();
            var result2 = @thisClass.GetCustomAttributeDescription(false);
            var result3 = @thisClass.GetType().GetCustomAttributeDescription();
            var result4 = @thisClass.GetType().GetCustomAttributeDescription(false);
            var result5 = @thisEnum.GetCustomAttributeDescription();
            var result6 = @thisEnum.GetCustomAttributeDescription(false);

            // Unit Test
            Assert.AreEqual("Test Description", result1);
            Assert.AreEqual("Test Description", result2);
            Assert.AreEqual("Test Description", result3);
            Assert.AreEqual("Test Description", result4);
            Assert.AreEqual("Test Description", result5);
            Assert.AreEqual("Test Description", result6);
        }
示例#2
0
        public void GetCustomAttributeDescription()
        {
            // Type
            var @thisClass = new System_Object_GetCustomAttributeDescription_TestClass();
            var @thisEnum  = System_Object_GetCustomAttributeDescription_TestEnum.Test;

            // Exemples
            var result1 = @thisClass.GetCustomAttributeDescription();
            var result2 = @thisClass.GetCustomAttributeDescription(false);
            var result3 = @thisClass.GetType().GetCustomAttributeDescription();
            var result4 = @thisClass.GetType().GetCustomAttributeDescription(false);
            var result5 = @thisEnum.GetCustomAttributeDescription();
            var result6 = @thisEnum.GetCustomAttributeDescription(false);

            // Unit Test
            Assert.AreEqual("Test Description", result1);
            Assert.AreEqual("Test Description", result2);
            Assert.AreEqual("Test Description", result3);
            Assert.AreEqual("Test Description", result4);
            Assert.AreEqual("Test Description", result5);
            Assert.AreEqual("Test Description", result6);
        }