コード例 #1
0
        public GetAatfIdByComplianceYearHandlerTests()
        {
            this.authorization = A.Fake <IWeeeAuthorization>();
            this.dataAccess    = A.Fake <IAatfDataAccess>();

            handler = new GetAatfIdByComplianceYearHandler(authorization, dataAccess);
        }
コード例 #2
0
        public async Task HandleAsync_NoInternalAccess_ThrowsSecurityException()
        {
            var authorization = new AuthorizationBuilder().DenyInternalAreaAccess().Build();

            handler = new GetAatfIdByComplianceYearHandler(authorization, dataAccess);

            Func <Task> action = async() => await handler.HandleAsync(A.Dummy <GetAatfIdByComplianceYear>());

            await action.Should().ThrowAsync <SecurityException>();
        }