public void MatchNamespaceWithExcludes()
{
AspectDefinition def = new AspectDefinition(LexicalInfo.Empty, "Wilber");
def.TargetType = new TargetTypeDefinition();
def.TargetType.TargetStrategy = TargetStrategyEnum.Namespace;
def.TargetType.NamespaceRoot = "System.Collections";
TypeReference typeRef = new TypeReference(LexicalInfo.Empty, "");
typeRef.ResolvedType = typeof(Stack);
def.TargetType.Excludes.Add( typeRef );
Assert.IsTrue( NamespaceMatcher.Instance.Match( typeof(IList), def ) );
Assert.IsTrue( NamespaceMatcher.Instance.Match( typeof(ArrayList), def ) );
Assert.IsFalse( NamespaceMatcher.Instance.Match( typeof(Stack), def ) );
}
}