Beispiel #1
0
        public async Task GivenIHaveUsedTheTenantStoreToCreateAServiceTenantWithManifest(string manifestName)
        {
            ServiceManifest manifest = this.scenarioContext.Get <ServiceManifest>(manifestName);

            ITenantStore service = ContainerBindings.GetServiceProvider(this.scenarioContext).GetRequiredService <ITenantStore>();

            ITenant newTenant = await service.CreateServiceTenantAsync(manifest).ConfigureAwait(false);

            this.scenarioContext.Set(newTenant.Id, manifest.ServiceName);
        }
Beispiel #2
0
        public Task CreateServiceTenantWithExceptionHandlingAsync(ServiceManifest manifest)
        {
            ITenantStore service = ContainerBindings.GetServiceProvider(this.scenarioContext).GetRequiredService <ITenantStore>();

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