예제 #1
0
        public async Task GivenICreateALeaseWithAnInMemoryLeaseProvider()
        {
            var leaseProvider = new InMemoryLeaseProvider();
            var policy        = this.scenarioContext.Get <LeasePolicy>();
            var lease         = await leaseProvider.AcquireAsync(policy);

            this.scenarioContext.Set(lease);
        }
예제 #2
0
        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");
        }