コード例 #1
0
        public async Task GetMemberUploadDataHandler_NotOrganisationUser_ThrowsSecurityException()
        {
            var denyingAuthorization = AuthorizationBuilder.CreateUserDeniedFromAccessingOrganisation();

            var handler = new GetMemberUploadDataHandler(denyingAuthorization, A.Dummy <WeeeContext>(), A.Dummy <MemberUploadErrorMap>());
            var message = new GetMemberUploadData(Guid.NewGuid(), Guid.NewGuid());

            await Assert.ThrowsAsync <SecurityException>(async() => await handler.HandleAsync(message));
        }
コード例 #2
0
        public async Task GetMemberUploadDataHandler_NotOrganisationUser_ThrowsSecurityException()
        {
            var denyingAuthorization = AuthorizationBuilder.CreateUserDeniedFromAccessingOrganisation();

            var handler = new GetMemberUploadDataHandler(denyingAuthorization, A.Dummy<WeeeContext>(), A.Dummy<MemberUploadErrorMap>());
            var message = new GetMemberUploadData(Guid.NewGuid(), Guid.NewGuid());

            await Assert.ThrowsAsync<SecurityException>(async () => await handler.HandleAsync(message));
        }