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); }
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); }
public async Task ProcessMessageAsync(GermGrowthMessage message) { await Task.CompletedTask; }