AspectSharp.Tests.MatcherTests.NamespaceMatcherTestCase.MatchNamespace C# (CSharp) Method

MatchNamespace() private method

private MatchNamespace ( ) : void
return void
		public void MatchNamespace()
		{
			AspectDefinition def = new AspectDefinition(LexicalInfo.Empty, "Wilber");

			def.TargetType = new TargetTypeDefinition();
			def.TargetType.TargetStrategy = TargetStrategyEnum.Namespace;
			def.TargetType.NamespaceRoot = "System.Collections";

			Assert.IsFalse( NamespaceMatcher.Instance.Match( typeof(Object), def ) );
			Assert.IsFalse( NamespaceMatcher.Instance.Match( typeof(HybridDictionary), def ) );
			Assert.IsTrue( NamespaceMatcher.Instance.Match( typeof(IList), def ) );
			Assert.IsTrue( NamespaceMatcher.Instance.Match( typeof(ArrayList), def ) );
			Assert.IsTrue( NamespaceMatcher.Instance.Match( typeof(Stack), def ) );
		}