public void should_check_all_structure() { //arrange var sender = new MessageSender(); var server = new Server(); var rec1 = new MessageReceiver(); var rec2 = new MessageReceiver(); //act rec1.Receive(server); rec2.Receive(server); //assert sender.SendMessage("ku"); }
public void should_check_if_message_sent() { //arrange var expected = "text"; var sender = new MessageSender(); string raisedMessage = null; sender.MessageAvailable += (obj, args) => raisedMessage = args.Message; //act sender.SendMessage(expected); //assert raisedMessage.Should().Be(expected); }