public void GetCustomAttributeByName() { // Type var @thisClass = new System_Object_GetCustomAttributeByName_TestClass(); var @thisEnum = System_Object_GetCustomAttributeByName_TestEnum.Test; // Exemples var result1 = @thisClass.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute"); var result2 = @thisClass.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute", false); var result3 = @thisClass.GetType().GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute"); var result4 = @thisClass.GetType().GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute", false); var result5 = @thisEnum.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute"); var result6 = @thisEnum.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute", false); // Unit Test Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute) result1).Text); Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute) result2).Text); Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute) result3).Text); Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute) result4).Text); Assert.AreEqual("Test Enum", ((System_Object_GetCustomAttributeByName_CustomAttribute) result5).Text); Assert.AreEqual("Test Enum", ((System_Object_GetCustomAttributeByName_CustomAttribute) result6).Text); }
public void GetCustomAttributeByName() { // Type var @thisClass = new System_Object_GetCustomAttributeByName_TestClass(); var @thisEnum = System_Object_GetCustomAttributeByName_TestEnum.Test; // Exemples var result1 = @thisClass.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute"); var result2 = @thisClass.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute", false); var result3 = @thisClass.GetType().GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute"); var result4 = @thisClass.GetType().GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute", false); var result5 = @thisEnum.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute"); var result6 = @thisEnum.GetCustomAttributeByName("System_Object_GetCustomAttributeByName_CustomAttribute", false); // Unit Test Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute)result1).Text); Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute)result2).Text); Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute)result3).Text); Assert.AreEqual("Test Class", ((System_Object_GetCustomAttributeByName_CustomAttribute)result4).Text); Assert.AreEqual("Test Enum", ((System_Object_GetCustomAttributeByName_CustomAttribute)result5).Text); Assert.AreEqual("Test Enum", ((System_Object_GetCustomAttributeByName_CustomAttribute)result6).Text); }