AspectSharp.Tests.MixinTests.MixinTestCase.ImplementLoggerProperty C# (CSharp) Метод

ImplementLoggerProperty() приватный Метод

private ImplementLoggerProperty ( ) : void
Результат void
		public void ImplementLoggerProperty()
		{
			String contents = "import AspectSharp.Tests.Classes in AspectSharp.Tests " + 
				" " + 
				" aspect McBrother for Author " + 
				"   " + 
				"   include Loggeable" + 
				"   " + 
				"   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.AreEqual( 0, author.BooksPublished );
			author.MoreOneBook();
			Assert.AreEqual( 1, author.BooksPublished );

			ILoggeable log = author as ILoggeable;
			String messages = log.GetLogMessages();
			// TODO: Correct compare
			Assert.AreEqual( "Invoking get_BooksPublished;Invoking MoreOneBook;Invoking get_BooksPublished;", messages );
		}