AspectSharp.Tests.MixinTests.MixinTestCase.MixinMethodsMustBeIntercepted C# (CSharp) Method

MixinMethodsMustBeIntercepted() private method

private MixinMethodsMustBeIntercepted ( ) : void
return void
		public void MixinMethodsMustBeIntercepted()
		{
			String contents = "import AspectSharp.Tests.Classes in AspectSharp.Tests " + 
				" " + 
				" aspect McBrother for Author " + 
				"   " + 
				"   include Loggeable" + 
				"   include DummyPerson" + 
				"   " +
				"   pointcut method|property(*)" + 
				"     advice(LogInvocationsInterceptor)" + 
				"   end" + 
				"   " + 
				" end ";

			AspectEngineBuilder builder = new AspectLanguageEngineBuilder(contents);
			AspectEngine engine = builder.Build();

			Author author = engine.WrapClass(typeof(Author)) as Author;
			Assert.IsNotNull(author);
			Assert.IsNotNull(author as ILoggeable);
			Assert.IsNotNull(author as IPerson);

			IPerson person = author as IPerson;
			person.Name = "McBilly";
			Assert.AreEqual( "McBilly", person.Name );

			ILoggeable log = author as ILoggeable;
			log.Log("Test");
			String messages = log.GetLogMessages();
			Assert.AreEqual( "Invoking set_Name;Invoking get_Name;Test;", messages );
		}