public void GetAttribute_memeberInfo_false()
        {
            Type            t      = typeof(MyBaseTestClass);
            MyTestAttribute actual = MemberInfoExtensions.GetAttribute <MyTestAttribute>(t, false);

            Assert.IsNotNull(actual);
        }
        public void GetAttribute_on_inherited_true()
        {
            Type            t      = typeof(MyDerivedTestClass);
            MyTestAttribute actual = MemberInfoExtensions.GetAttribute <MyTestAttribute>(t, true);

            Assert.IsNotNull(actual);
        }
示例#3
0
 public void WhenIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => MemberInfoExtensions.GetAttribute <UsedMethodAttribute>(null));
 }
 public void GetAttribute_null_memberInfo()
 {
     MemberInfoExtensions.GetAttribute <MyTestAttribute>(null);
 }
 public void GetAttribute_null_memberInfo_false()
 {
     MemberInfoExtensions.GetAttribute <MyTestAttribute>(null, true);
 }