本文整理汇总了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"));
}