public void MethodHasATrait() { Type testClassType = typeof(ClassWithTraits); MethodInfo methodInfo = testClassType.GetMethod("SingleTraitOnAMethod"); Assert.True(MethodUtility.HasTraits(Reflector.Wrap(methodInfo))); }
public void ClassHasTrait() { Type testClassType = typeof(ClassWithClassTraits); MethodInfo methodInfo = testClassType.GetMethod("TestMethod"); Assert.True(MethodUtility.HasTraits(Reflector.Wrap(methodInfo))); }
public void MethodDoesNotHaveTraits() { Type testClassType = typeof(ClassWithTraits); MethodInfo methodInfo = testClassType.GetMethod("MethodDoesNotHaveTestTraits"); Assert.False(MethodUtility.HasTraits(Reflector.Wrap(methodInfo))); }