public void GivenActorAHasAlreadyAcquiredALeaseForAnOperationCalled(string leaseName) { var policy = new LeasePolicy { Name = leaseName, Duration = TimeSpan.FromSeconds(15) }; var lease = new Lease(new AzureLeaseProvider(new ConnectionStringProvider()), new AzureLeasePolicyValidator()); lease.AcquireAsync(policy).Wait(); ScenarioContext.Current.Set(lease, "ActorALease"); }
public void GivenIAmTheOnlyActorTryingToPerformAnOperationCalled(string leaseName) { var policy = new LeasePolicy { Name = leaseName }; ScenarioContext.Current.Set(policy); }
public void GivenTheNameOnTheLeasePolicyIsNull() { var policy = new LeasePolicy(); ScenarioContext.Current.Set(policy); }
public void GivenTheNameOnTheLeasePolicyIs(string name) { var policy = new LeasePolicy { Name = name }; ScenarioContext.Current.Set(policy); }
public void GivenTheDurationOnTheLeasePolicyIsSeconds(int leaseDurationInSeconds) { var policy = new LeasePolicy { Duration = TimeSpan.FromSeconds(leaseDurationInSeconds) }; ScenarioContext.Current.Set(policy); }
public void GivenTheDurationOnTheLeasePolicyIsNull() { var policy = new LeasePolicy { Duration = null }; ScenarioContext.Current.Set(policy); }