AspectSharp.Tests.MatcherTests.AssignableMatcherTestCase.MatchAssignable C# (CSharp) Method

MatchAssignable() private method

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

			def.TargetType = new TargetTypeDefinition();
			def.TargetType.TargetStrategy = TargetStrategyEnum.Assignable;
			
			TypeReference typeRef = new TypeReference(LexicalInfo.Empty, "");
			typeRef.ResolvedType = typeof(IList);

			def.TargetType.AssignType = typeRef;

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