Example #1
0
            public void MethodHasATrait()
            {
                Type       testClassType = typeof(ClassWithTraits);
                MethodInfo methodInfo    = testClassType.GetMethod("SingleTraitOnAMethod");

                Assert.True(MethodUtility.HasTraits(Reflector.Wrap(methodInfo)));
            }
Example #2
0
            public void ClassHasTrait()
            {
                Type       testClassType = typeof(ClassWithClassTraits);
                MethodInfo methodInfo    = testClassType.GetMethod("TestMethod");

                Assert.True(MethodUtility.HasTraits(Reflector.Wrap(methodInfo)));
            }
Example #3
0
            public void MethodDoesNotHaveTraits()
            {
                Type       testClassType = typeof(ClassWithTraits);
                MethodInfo methodInfo    = testClassType.GetMethod("MethodDoesNotHaveTestTraits");

                Assert.False(MethodUtility.HasTraits(Reflector.Wrap(methodInfo)));
            }