Ejemplo n.º 1
0
    public async Task CreateSimpleTemplate()
    {
        var template = await AzureDeploymentTemplate
                       .CreateAsync <SimpleTemplate>()
                       .ConfigureAwait(false);

        Assert.NotNull(template.Template);
        Assert.NotNull(template.Parameters);
        Assert.NotNull(template.LinkedTemplates);

        Assert.Contains(template.Parameters.Keys, parameterName => TemplateParameterTypes.Contains(parameterName));
    }
Ejemplo n.º 2
0
    public async Task CreateComplexTemplate()
    {
        var template = await AzureDeploymentTemplate
                       .CreateAsync <ComplexTemplate>()
                       .ConfigureAwait(false);

        Assert.NotNull(template.Template);
        Assert.NotNull(template.Parameters);
        Assert.NotNull(template.LinkedTemplates);

        var linkedTemplates = new string[] { "Linked1.json", "Linked2.json" };

        Assert.Contains(template.LinkedTemplates.Keys, templateName => linkedTemplates.Contains(templateName));
    }