public void ItemFailed_WhenReminderNotificationFailed_ShouldRaiseEvent() { //Arrange var receiver = new ReminderReceiverFake(); var service = new ReminderService(Storage, FailureSender, null, Parameters); var eventRaised = false; //Act service.ItemFailed += (sender, args) => eventRaised = true; receiver.Emit(); WaitTimers(); //Assert Assert.IsTrue(eventRaised); }
public void ItemSent_WhenReminderNotificationSent_ShouldRaiseEvent() { // Arrange var eventRaised = false; var receiver = new ReminderReceiverFake(); using var service = new ReminderService(Storage, SuccessSender, receiver, Parameters); // Act service.ItemSent += (sender, args) => eventRaised = true; service.Start(); receiver.Emit(); WaitTimers(); // Assert Assert.IsTrue(eventRaised); }