public void When_InValidDoorbellMessageTypeArrives_ThenMessagedetailsAreNotPublished() { _count = 0; DoorBellProcessor processor = new DoorBellProcessor(); _container.ComposeParts(processor); IMessage message = new Message("BLAH", "10"); processor.Execute(message); Assert.AreEqual(0, _count, "The message fired and it should not have"); }
public void When_DoorBellMessageContainsTooManyParameters_ThenMessagedetailsAreNotPublished() { _count = 0; DoorBellProcessor processor = new DoorBellProcessor(); _container.ComposeParts(processor); IMessage message = new Message(processor.MessageType, "1:BLAH"); processor.Execute(message); Assert.AreEqual(0, _count, "The message did fire and it should not have"); }
public void When_ValidDoorBellMessageArrives_ThenMessagedetailsArePublished() { _count = 0; DoorBellProcessor processor = new DoorBellProcessor(); _container.ComposeParts(processor); IMessage message = new Message(processor.MessageType, "1"); processor.Execute(message); Assert.AreEqual(1, _count, "The message did not fire"); }