System.Tests.GetCustomAttribute.NegTest5 C# (CSharp) 메소드

NegTest5() 개인적인 메소드

private NegTest5 ( ) : void
리턴 void
        public static void NegTest5()
        {
            ParameterInfo element = null;
            Type attributeType = typeof(DebuggableAttribute);
            Type clsType = typeof(DerivedClass);

            Assert.Throws<ArgumentNullException>(() => (DebuggableAttribute)Attribute.GetCustomAttribute(element, attributeType));
            attributeType = null;
            Assert.Throws<ArgumentNullException>(() => (DebuggableAttribute)Attribute.GetCustomAttribute(clsType.Module, attributeType));
            attributeType = typeof(object);
            Assert.Throws<ArgumentException>(() => (DebuggableAttribute)Attribute.GetCustomAttribute(clsType.Module, attributeType));

        }
        [Fact]