Ejemplo n.º 1
0
 public static void ForAllSets(GeneratorConfiguration config)
 {
     Logger.Debug("ForAllSets...");
     foreach (var project in config.Projects)
     {
         Logger.Debug("project - Name: {0}, Path: {1}", project.Name, project.Path);
         var templateDir = Path.Combine(project.Path, config.TemplateDir);
         ForAllSets(config.ConfigRoot, templateDir, config.OutputDir, project.Name,
             false, config.Debug, null, config.ConfigExtension, config.TemplateExtension);
     }
 }
        public void Should_apply_property_transformation_for_its_properties()
        {
            var config = new GeneratorConfiguration();
            config.ConfigDir = "aaa";
            config.ConfigExtension = "$(aaa)";
            config.ConfigRoot = "aaa $(bbb)";

            var properties = new Dictionary<string, string> {{"aaa", "AAA"}, {"bbb", "BBB"}};
            config.ApplyProperties(properties);
            Assert.AreEqual("aaa", config.ConfigDir);
            Assert.AreEqual("AAA", config.ConfigExtension);
            Assert.AreEqual("aaa BBB", config.ConfigRoot);
        }