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

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

            Assert.IsNotNull(actual);
        }
Exemplo n.º 3
0
 public void WhenIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => MemberInfoExtensions.GetAttribute <UsedMethodAttribute>(null));
 }
Exemplo n.º 4
0
 public void GetAttribute_null_memberInfo()
 {
     MemberInfoExtensions.GetAttribute <MyTestAttribute>(null);
 }
Exemplo n.º 5
0
 public void GetAttribute_null_memberInfo_false()
 {
     MemberInfoExtensions.GetAttribute <MyTestAttribute>(null, true);
 }