Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }