コード例 #1
0
        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();
        }
コード例 #2
0
        public async Task <IList <NotificationAuditScreen> > HandleAsync(GetNotificationAuditScreens message)
        {
            var screens = await this.repository.GetNotificationAuditScreens();

            return(screens.Select(screen => this.Map(screen)).ToList());
        }