Esempio n. 1
0
 private static void SetUpCategorySelector(string optionName, CmdLineHandler clh, IRecipe recipe)
 {
     if (clh.HasOption(optionName))
     {
         var selector = new CategorySelector();
         selector.IncludedCategories.Add(clh.GetOptionValueFor(optionName));
         recipe.RegisterSelector(selector);
     }
 }
Esempio n. 2
0
 private static void SetUpRegexSelector(CmdLineHandler clh, IRecipe recipe)
 {
     if (clh.HasOption("pattern"))
     {
         var selector = new RegexSelector {
             Pattern = clh.GetOptionValueFor("pattern")
         };
         recipe.RegisterSelector(selector);
     }
 }
        public void ChangingFilterMarksRecipeModified()
        {
            XmlDocumentFactory.Type = typeof(XmlDocumentMock);
            CategorySelector selector = new CategorySelector();
            IRecipe          recipe   = RecipeFactory.NewRecipe(string.Empty);

            recipe.RegisterSelector(selector);
            recipe.Save(@"c:\nirvana.recipe");
            Assert.False(recipe.Modified, "Expected recipe not being modified.");
            selector.IncludedCategories.Add("bla");
            Assert.True(recipe.Modified, "Expected recipe being modified.");
        }
Esempio n. 4
0
 private static void SetUpRegexSelector(CmdLineHandler clh, IRecipe recipe) {
    if(clh.HasOption("pattern")) {
       var selector = new RegexSelector {  
          Pattern = clh.GetOptionValueFor( "pattern" )
       };
       recipe.RegisterSelector(selector);
    }
 }
Esempio n. 5
0
 private static void SetUpCategorySelector(string optionName, CmdLineHandler clh, IRecipe recipe) {
    if(clh.HasOption(optionName)) {
       var selector = new CategorySelector();
       selector.IncludedCategories.Add(clh.GetOptionValueFor(optionName));
       recipe.RegisterSelector(selector);
    }
 }