Exemple #1
0
        private InfrastructureToResourcesRenderer GivenARenderer(
            IAzure azure,
            IResourceGroupTargetingStrategy resourceGroupTargetingStrategy       = null,
            IResourceLocationTargetingStrategy resourceLocationTargetingStrategy = null,
            TinyIoCContainer ioc = null
            )
        {
            resourceGroupTargetingStrategy = resourceGroupTargetingStrategy ??
                                             new ResourceGroupPerEnvironmentStrategy(e => "test");

            resourceLocationTargetingStrategy = resourceLocationTargetingStrategy ??
                                                new FixedResourceLocationTargetingStrategy("westeurope");

            ioc = ioc ?? WithRenderers(new TinyIoCContainer());

            var renderer = new InfrastructureToResourcesRenderer(
                resourceGroupTargetingStrategy,
                resourceLocationTargetingStrategy,
                GetAzureConnector(azure),
                Environment,
                ioc);

            return(renderer);
        }
Exemple #2
0
 private static async Task WhenRendering(InfrastructureToResourcesRenderer toResourcesRenderer)
 {
     await toResourcesRenderer.Render(new SampleSystem(new Workspace("sample", "sample"), new InfrastructureEnvironment("test")));
 }