public void Raise_WithArguments_EventIsNull() { int expected = 10; var target = new SomeType(); //Act target.Notify(expected); //Assert //Doesn't crash }
public void Raise_WithArguments_EventNotNull() { object eventSender = null; int eventId = 0; int expected = 10; var target = new SomeType(); target.SomeEvent += (o, e) => { eventSender = o; eventId = e.Id; }; //Act target.Notify(expected); //Assert eventSender.Should().Be(target); eventId.Should().Be(expected); }