Ejemplo n.º 1
0
 public static bool IsEquivalentTo(this GermGrowthMessage parameter, GermGrowthMessage expectedMessage)
 {
     return(parameter.Budding == expectedMessage.Budding &&
            parameter.Germ == expectedMessage.Germ &&
            parameter.Sender == expectedMessage.Sender &&
            parameter.Lytic == expectedMessage.Lytic &&
            parameter.ReplicationMultiplier == expectedMessage.ReplicationMultiplier);
 }
Ejemplo n.º 2
0
        private static void VerifyCorrectMessageIsSent(IListenOn <GermGrowthMessage> listener, IGerm matureVirus)
        {
            var expectedMessaged = new GermGrowthMessage(true, false, ReplicationMultiplier, matureVirus);

            Mock.Get(listener).Verify(
                v => v.ProcessMessageAsync(
                    It.Is <GermGrowthMessage>(m => m.IsEquivalentTo(expectedMessaged))),
                Times.Once);
        }
Ejemplo n.º 3
0
 public async Task ProcessMessageAsync(GermGrowthMessage message)
 {
     await Task.CompletedTask;
 }