本文整理匯總了C#中OpenCover.Framework.Filter.ExcludeByFile方法的典型用法代碼示例。如果您正苦於以下問題:C# Filter.ExcludeByFile方法的具體用法?C# Filter.ExcludeByFile怎麽用?C# Filter.ExcludeByFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenCover.Framework.Filter
的用法示例。
在下文中一共展示了Filter.ExcludeByFile方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: File_Is_Excluded_If_Matches_Filter
public void File_Is_Excluded_If_Matches_Filter()
{
var filter = new Filter();
filter.AddFileExclusionFilters(new[] { "XXX.*" });
Assert.IsTrue(filter.ExcludeByFile("XXX.cs"));
}
示例2: File_Is_Not_Excluded_If_Does_Not_Match_Filter
public void File_Is_Not_Excluded_If_Does_Not_Match_Filter()
{
var filter = new Filter();
filter.AddFileExclusionFilters(new[]{"XXX.*"});
Assert.IsFalse(filter.ExcludeByFile("YYY.cs"));
}
示例3: File_Is_Not_Excluded_If_No_Filters_Set
public void File_Is_Not_Excluded_If_No_Filters_Set()
{
var filter = new Filter();
Assert.IsFalse(filter.ExcludeByFile("xyz.cs"));
}
示例4: File_Is_Not_Excluded_If_No_File_Not_Supplied
public void File_Is_Not_Excluded_If_No_File_Not_Supplied()
{
var filter = new Filter();
Assert.IsFalse(filter.ExcludeByFile(""));
}
示例5: File_Is_Excluded_If_Matches_Filter_UsingRegularExpressions
public void File_Is_Excluded_If_Matches_Filter_UsingRegularExpressions()
{
// arrange
var filter = new Filter(true);
filter.AddFileExclusionFilters(new[] { @"XXX\..*" });
// act, assert
Assert.IsTrue(filter.ExcludeByFile("XXX.cs"));
}