public async Task GivenICreateALeaseWithAnInMemoryLeaseProvider() { var leaseProvider = new InMemoryLeaseProvider(); var policy = this.scenarioContext.Get <LeasePolicy>(); var lease = await leaseProvider.AcquireAsync(policy); this.scenarioContext.Set(lease); }
public async Task GivenICreateATokenForALeaseWithAnInMemoryLeaseProvider() { var leaseProvider = new InMemoryLeaseProvider(); var policy = this.scenarioContext.Get <LeasePolicy>(); var lease = await leaseProvider.AcquireAsync(policy); string leaseToken = leaseProvider.ToLeaseToken(lease); this.scenarioContext.Set(lease); this.scenarioContext.Set(leaseToken, "LeaseToken"); }