Esempio n. 1
0
        public void TestAround()
        {
            try
            {
                MyComponent my = new MyComponent();

                my.AddCount();
                Assert.IsTrue(MyAroundAdvisor.around_a);
                Assert.AreEqual(1, my.Count);
            }
            finally
            {
                MyAroundAdvisor.around_a = false;
            }
        }
Esempio n. 2
0
        public void TestAroundNotProceed()
        {
            MyComponent my = new MyComponent();

            my.AddCount();
            MyAroundAdvisor.around_b = false;

            try
            {
                my.Reset();//Method will be skip
                Assert.IsTrue(MyAroundAdvisor.around_b);
                Assert.AreEqual(1, my.Count);
            }
            finally
            {
                MyAroundAdvisor.around_b = false;
            }
        }