Add some test for exclude filters with namespaces (#579)
Add some test for exclude filters with namespaces
This commit is contained in:
@@ -140,6 +140,22 @@ namespace Coverlet.Core.Helpers.Tests
|
||||
Assert.False(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestIsTypeExcludedNamespace()
|
||||
{
|
||||
var result = _instrumentationHelper.IsTypeExcluded("Module.dll", "Namespace.Namespace.Type", new string[]{ "[Module]Namespace.Namespace.*" });
|
||||
Assert.True(result);
|
||||
|
||||
result = _instrumentationHelper.IsTypeExcluded("Module.dll", "Namespace.Namespace.TypeB", new string[] { "[Module]Namespace.Namespace.*" });
|
||||
Assert.True(result);
|
||||
|
||||
result = _instrumentationHelper.IsTypeExcluded("Module.dll", "Namespace.Namespace.Type", new string[] { "[Module]Namespace.*" });
|
||||
Assert.True(result);
|
||||
|
||||
result = _instrumentationHelper.IsTypeExcluded("Module.dll", "Namespace.Namespace.Type", new string[] { "[Module]Namespace.WrongNamespace.*" });
|
||||
Assert.False(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestIsTypeIncludedWithoutFilter()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user