예제 #1
0
        private void ExpectCallToSend(BusSendDelegate callback)
        {
            IMessage[] messages = null;

            Expect.Call(() => bus.Send(messages))
            .IgnoreArguments().Return(null)
            .Callback(callback);
        }
예제 #2
0
        private void ExpectCallToReply(BusSendDelegate callback)
        {
            object[] messages = null;

            Expect.Call(() => bus.Reply(messages))
            .IgnoreArguments()
            .Callback(callback);
        }
예제 #3
0
 private void DoNotExpectCallToSendLocal <T>(BusSendDelegate callback)
 {
     bus.Stub(b => bus.SendLocal(Arg <T> .Is.Anything))
     .IgnoreArguments()
     .Callback(callback)
     .Throw(
         new ExpectationViolationException(string.Format("Did not expect a call to SendLocal<{0}> matching predicate {1}",
                                                         typeof(T).FullName, callback)));
 }
예제 #4
0
 private void ExpectCallToSend <T>(BusSendDelegate callback)
 {
     Expect.Call(() => bus.Send(Arg <T> .Is.Anything))
     .IgnoreArguments().Return(null)
     .Callback(callback);
 }