Example #1
0
        public async Task HandleAsync_GivenRequest_GetAatfIdShouldBeCalled()
        {
            var result = await handler.HandleAsync(A.Dummy <GetAatfIdByComplianceYear>());

            A.CallTo(() => dataAccess.GetAatfByAatfIdAndComplianceYear(A.Dummy <Guid>(), A.Dummy <short>())).MustHaveHappened(Repeated.Exactly.Once);
        }
Example #2
0
        public async Task <Guid> HandleAsync(GetAatfIdByComplianceYear message)
        {
            authorization.EnsureCanAccessInternalArea();

            return(await aatfDataAccess.GetAatfByAatfIdAndComplianceYear(message.AatfId, (short)message.ComplianceYear));
        }