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

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

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

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