コード例 #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);
     }
 }
コード例 #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);
     }
 }
コード例 #3
0
        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.");
        }
コード例 #4
0
ファイル: csUnitCmdApp.cs プロジェクト: ManfredLange/csUnit
 private static void SetUpRegexSelector(CmdLineHandler clh, IRecipe recipe) {
    if(clh.HasOption("pattern")) {
       var selector = new RegexSelector {  
          Pattern = clh.GetOptionValueFor( "pattern" )
       };
       recipe.RegisterSelector(selector);
    }
 }
コード例 #5
0
ファイル: csUnitCmdApp.cs プロジェクト: ManfredLange/csUnit
 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);
    }
 }