示例#1
0
        private void ExpectCallToPublish <T>(BusPublishDelegate <T> callback) where T : IMessage
        {
            T[] messages = null;

            Expect.Call(() => bus.Publish(messages))
            .IgnoreArguments()
            .Callback(callback);
        }
示例#2
0
 private void DoNotExpectCallToPublish <T>(BusPublishDelegate <T> callback)
 {
     bus.Stub(b => bus.Publish(Arg <T> .Is.Anything))
     .IgnoreArguments()
     .Callback(callback)
     .Throw(
         new ExpectationViolationException(string.Format("Did not expect a call to Publish<{0}> matching predicate {1}",
                                                         typeof(T).FullName, callback)));
 }