System.Tests.GetCustomAttribute.NegTest5 C# (CSharp) Method

NegTest5() private method

private NegTest5 ( ) : void
return 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]