public NotificationAuditScreenGetHandlerTests() { context = new TestIwsContext(); var repo = A.Fake <INotificationAuditScreenRepository>(); List <AuditScreen> auditScreens = new List <AuditScreen>() { new AuditScreen("Screen1"), new AuditScreen("Screen2") }; A.CallTo(() => repo.GetNotificationAuditScreens()).Returns(auditScreens); handler = new GetNotificationAuditScreensHandler(context, repo); message = new GetNotificationAuditScreens(); }
public async Task <IList <NotificationAuditScreen> > HandleAsync(GetNotificationAuditScreens message) { var screens = await this.repository.GetNotificationAuditScreens(); return(screens.Select(screen => this.Map(screen)).ToList()); }