public void VerifyRelease(Func <Times> times) { LeaseService.Verify( x => x.ReleaseAsync(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <CancellationToken>()), times); LeaseService.Verify( x => x.ReleaseAsync(LeaseResourceName, LeaseResult.LeaseId, It.IsAny <CancellationToken>()), times); }
public void VerifyAcquire(Func <Times> times) { LeaseService.Verify( x => x.TryAcquireAsync(It.IsAny <string>(), It.IsAny <TimeSpan>(), It.IsAny <CancellationToken>()), times); LeaseService.Verify( x => x.TryAcquireAsync(LeaseResourceName, It.IsAny <TimeSpan>(), It.IsAny <CancellationToken>()), times); }