public async Task TestThatLockFailsIfBlobLeaseThrowsStorageException() { var blobLeaseStub = new StubIBlobLease { TryAcquireLease = () => AsyncUtils.AsyncTaskThatThrows<string>(new StorageException()), IDisposable_Dispose = () => { } }; await TestThatLockFailsIfBlobLeaseCantBeAcquired(blobLeaseStub); }
public async Task TestThatLockFailsIfBlobLeaseReturnsNull() { var blobLeaseStub = new StubIBlobLease { TryAcquireLease = () => AsyncUtils.AsyncTaskWithResult<string>(null), IDisposable_Dispose = () => { } }; await TestThatLockFailsIfBlobLeaseCantBeAcquired(blobLeaseStub); }