public static void ShouldHaveHandler <T>(this HandlerChain chain, Expression <Action <T> > expression) { chain.ShouldNotBeNull(); var method = ReflectionHelper.GetMethod(expression); chain.Handlers.Any(x => x.Method.Name == method.Name).ShouldBeTrue(); }
public static void ShouldBeWrappedWith <T>(this HandlerChain chain) where T : Frame { chain.ShouldNotBeNull(); chain.Middleware.OfType <T>().Any().ShouldBeTrue(); }
public static void ShouldHaveHandler <T>(this HandlerChain chain, string methodName) { chain.ShouldNotBeNull(); chain.Handlers.Any(x => x.Method.Name == methodName && x.HandlerType == typeof(T)).ShouldBeTrue(); }