Ejemplo n.º 1
0
        public void read_has_set_if_none_semantics()
        {
            var substitutions = new Substitutions();
            substitutions.Set("key", "something");
            substitutions.Set("two", "twenty");

            substitutions.WriteTo("fubu.template.config");

            var substitutions2 = new Substitutions();
            substitutions2.Set("key", "ORIGINAL");
            substitutions2.ReadFrom("fubu.template.config");

            substitutions2.ValueFor("key").ShouldEqual("ORIGINAL");
            substitutions2.ValueFor("two").ShouldEqual("twenty");
        }
Ejemplo n.º 2
0
        public void write_and_read()
        {
            var substitutions = new Substitutions();
            substitutions.Set("key", "something");
            substitutions.Set("two", "twenty");

            substitutions.WriteTo("fubu.template.config");

            var substitutions2 = new Substitutions();
            substitutions2.ReadFrom("fubu.template.config");

            substitutions2.ValueFor("key").ShouldEqual("something");
            substitutions2.ValueFor("two").ShouldEqual("twenty");
        }
Ejemplo n.º 3
0
        public void substitutions_do_not_write_instructions()
        {
            var substitutions = new Substitutions();
            substitutions.Set("key", "something");
            substitutions.Set("two", "twenty");
            substitutions.Set(TemplatePlan.INSTRUCTIONS, "something");

            substitutions.WriteTo("fubu.template.config");

            var substitutions2 = new Substitutions();
            substitutions2.ReadFrom("fubu.template.config");

            substitutions2.Has(TemplatePlan.INSTRUCTIONS).ShouldBeFalse();
        }