public void SetUp()
        {
            var writer = new DeploymentWriter("profile2");

            var host = writer.RecipeFor("r1").HostFor("h1");

            host.AddDirective(new SimpleSettings{
                One = "one",
                Two = "two"
            });

            host.AddDirective(new OneSettings()
                              {
                                  Name = "Jeremy",
                                  Age = 37
                              });

            host.AddReference(new BottleReference()
                              {
                                  Name = "bottle1"
                              });

            host.AddReference(new BottleReference()
                              {
                                  Name = "bottle2"
                              });

            writer.Flush(FlushOptions.Wipeout);

            var env = new EnvironmentSettings();
            theHost = HostReader.ReadFrom("profile2/recipes/r1/h1.host");
        }
Esempio n. 2
0
        public static EnvironmentSettings ReadFrom(string environmentFile)
        {
            var environment = new EnvironmentSettings();
            SettingsData.ReadFromFile(environmentFile, environment.Data);

            return environment;
        }
        public void SetUp()
        {
            var writer = new DeploymentWriter("starwars");

            var recipeDefinition = writer.RecipeFor("r1");
            var host = recipeDefinition.HostFor("h1");

            host.AddDirective(new SimpleSettings
            {
                One = "one",
                Two = "two"
            });

            host.AddDirective(new OneSettings()
            {
                Name = "Jeremy",
                Age = 37
            });

            host.AddReference(new BottleReference()
            {
                Name = "bottle1"
            });

            host.AddReference(new BottleReference()
            {
                Name = "bottle2"
            });

            recipeDefinition.HostFor("h2").AddProperty<ThreeSettings>(x => x.Direction, "North");
            recipeDefinition.HostFor("h3").AddProperty<TwoSettings>(x => x.City, "Austin");

            writer.RecipeFor("r2").HostFor("h3").AddProperty<SimpleSettings>(x => x.One, "one");
            writer.RecipeFor("r3").HostFor("h3").AddProperty<SimpleSettings>(x => x.Two, "two");
            writer.RecipeFor("r4").HostFor("h4").AddProperty<SimpleSettings>(x => x.Two, "ten");
            writer.RecipeFor("r4").HostFor("h5").AddProperty<SimpleSettings>(x => x.Two, "ten");
            writer.RecipeFor("r4").HostFor("h5").AddProperty<SimpleSettings>(x => x.One, "setting is {setting}");

            writer.Flush(FlushOptions.Wipeout);

            var environmentSettings = new EnvironmentSettings();
            environmentSettings.Data["setting"] = "environment setting";

            theRecipes = RecipeReader.ReadRecipes("starwars".AppendPath("recipes"));
        }
 public void SetUp()
 {
     theEnvironmentSettings = new EnvironmentSettings();
 }
Esempio n. 5
0
        public void SetUp()
        {
            theEnvironment = new EnvironmentSettings();
            theEnvironment.Data["Env1"] = "Env1-Val";
            theEnvironment.Data["Shared"] = "Shared-Env-Val";

            theProfile = new Profile("profile1");
            theProfile.AddRecipe("something");

            theProfile.Data["Shared"] = "Shared-Profile-Val";
            theProfile.Data["Profile1"] = "Profile1-Val";

            theRecipes = new Recipe[] { new Recipe("something"), };
        }