public async Task MarkResourceAsDeleted_Should_ThrowException_IfEntityIsAlreadyLocked() { //Arrange var pidUri = GetRandomPidUri(); var lockService = _lockServiceFactory.CreateLockService(); lockService.CreateLock(pidUri.ToString()); // Act && Assert await Assert.ThrowsAsync <Cache.Exceptions.ResourceLockedException>(() => _service.MarkResourceAsDeletedAsync(pidUri, _validRequester)); }
public void CreateLockService_ReturnsNewLockServiceObject_Successful() { var lockService = _lockFactory.CreateLockService(); Assert.NotNull(lockService); }