public static void AssertWasNotPublished <T>(this IBus bus) where T : IMessage { if (typeof(T).IsInterface) { bus.AssertWasNotCalled(p => p.Publish(Arg <Action <T> > .Matches( actionOnInterface => VerifyAction(actionOnInterface, x => true) ))); } else { bus.AssertWasNotCalled(s => s.Publish(Arg <IMessage[]> .Matches( a => true))); } }
public static void AssertWasNotSentLocally <T>(this IBus bus) where T : IMessage { bus.AssertWasNotCalled(s => s.SendLocal(Arg <IMessage[]> .Matches( a => true))); }