public virtual void TestBasicInterceptionMethods() { IUnityContainer container = this.GetContainer(); BasicInterceptionTestClass testClass = container.Resolve <BasicInterceptionTestClass>(); testClass.MethodTest1(); Assert.AreEqual(1, container.Resolve <TestCallHandler>("TestCallHandler").InterceptionCount); }
public virtual void TestBasicInterceptionIndexers() { IUnityContainer container = this.GetContainer(); BasicInterceptionTestClass testClass = container.Resolve <BasicInterceptionTestClass>(); testClass[5] = new object(); object o = testClass[3]; Assert.AreEqual(2, container.Resolve <TestCallHandler>("TestCallHandler").InterceptionCount); }
public virtual void TestBasicInterceptionProperties() { IUnityContainer container = this.GetContainer(); BasicInterceptionTestClass testClass = container.Resolve <BasicInterceptionTestClass>(); object o1 = testClass.PropertyTest1; testClass.PropertyTest2 = new object(); testClass.PropertyTest3 = new object(); object o2 = testClass.PropertyTest3; object o3 = testClass.PropertyTest4; Assert.AreEqual(5, container.Resolve <TestCallHandler>("TestCallHandler").InterceptionCount); }