Beispiel #1
0
        public async Task GivenIHaveUsedTheTenantStoreToCreateANewClientTenantCalled(string clientName)
        {
            ITenantStore service   = ContainerBindings.GetServiceProvider(this.scenarioContext).GetRequiredService <ITenantStore>();
            ITenant      newTenant = await service.CreateClientTenantAsync(clientName).ConfigureAwait(false);

            this.scenarioContext.Set(newTenant.Id, clientName);
        }
Beispiel #2
0
        public Task WhenIUseTheTenantStoreToCreateANewClientTenantCalled(string clientName)
        {
            ITenantStore service = ContainerBindings.GetServiceProvider(this.scenarioContext).GetRequiredService <ITenantStore>();

            return(CatchException.AndStoreInScenarioContextAsync(
                       this.scenarioContext,
                       async() =>
            {
                ITenant newTenant = await service.CreateClientTenantAsync(clientName).ConfigureAwait(false);
                this.scenarioContext.Set(newTenant.Id, clientName);
            }));
        }