public void IsActiveMatchesStackState()
 {
     Assert.IsFalse(AopContext.IsActive);
     AopContext.PushProxy("Foo");
     Assert.IsTrue(AopContext.IsActive);
     AopContext.PopProxy();
     Assert.IsFalse(AopContext.IsActive);
 }
 public void SetUp()
 {
     // makes sure the context is always empty before any unit test...
     try
     {
         do
         {
             AopContext.PopProxy();
         } while (true);
     }
     catch (AopConfigException)
     {
     }
 }
 public void PopProxyWithNothingOnStack()
 {
     Assert.Throws <AopConfigException>(() => AopContext.PopProxy());
 }