コード例 #1
0
 public static void LocalMessageShouldMatch <T>(this TpBusMock localBusMock, params Predicate <T>[] predicates)
     where T : class
 {
     localBusMock.LocalMessages.Count.Should(Is.EqualTo(1),
                                             "1 local message should be sent");
     localBusMock.LocalMessages[0].Should(Is.InstanceOf(typeof(T)));
     predicates.ToList().ForEach(x => x(localBusMock.LocalMessages[0] as T));
 }
コード例 #2
0
 public static void SentCommandsShouldMatch <T>(this TpBusMock commandBusMock, params Predicate <T>[] predicates)
     where T : class
 {
     commandBusMock.SentCommands.Count.Should(Is.EqualTo(1),
                                              "1 message should be sent");
     commandBusMock.SentCommands[0].Should(Is.InstanceOf(typeof(T)));
     predicates.ToList().ForEach(x => x(commandBusMock.SentCommands[0] as T));
 }