public async Task NoSendsGreetingWhenNoBirthdays() { var employeeCatalog = new StubNoEmployeesCatalog(); var greetingsNotification = new SpyGreetingsNotificationHistory(); var service = new DefaultBirthdayService(employeeCatalog, greetingsNotification); await service.SendGreetings(new DateTime(2020, 11, 25)); Assert.Empty(greetingsNotification.EmailSent); }
public async Task NoSendsGreetingWhenNoBirthdays_() { var employeeCatalog = new StubNoEmployeesCatalog(); var greetingsNotification = new MockGreetingsNotigication(); var service = new DefaultBirthdayService(employeeCatalog, greetingsNotification); greetingsNotification .ExpectSendBirthdayCalledEmptyList(); await service.SendGreetings(new DateTime(2020, 11, 25)); greetingsNotification.Verify(); }