public async Task RemoveDeletedArtifactsFromCollection_AllParametersAreValid_Success()
        {
            // Arrange

            // Act
            await _collectionRepository.RemoveDeletedArtifactsFromCollectionAsync(CollectionId, UserId);
        }
Exemple #2
0
        private async Task <Collection> ValidateCollectionAsync(int collectionId, int userId, IDbTransaction transaction)
        {
            var collection = await GetCollectionAsync(collectionId, userId, transaction);

            if (!collection.Permissions.HasFlag(RolePermissions.Edit))
            {
                throw CollectionsExceptionHelper.NoEditPermissionException(collectionId);
            }

            await LockAsync(collection, userId, transaction);

            await _collectionsRepository.RemoveDeletedArtifactsFromCollectionAsync(collection.Id, userId, transaction);

            return(collection);
        }