Ejemplo n.º 1
0
		public void Interceptor_can_proceed_multiple_times_after_exception_from_within()
		{
			var interceptor = new ProceedNTimesInterceptor(5);
			var throwing = new ThrowingInterceptor();
			var target = new Simple();
			var proxy = generator.CreateInterfaceProxyWithTarget<ISimple>(target, interceptor, throwing);

			proxy.Method();
		}
Ejemplo n.º 2
0
		public void Interceptor_can_proceed_multiple_times()
		{
			var interceptor = new ProceedNTimesInterceptor(3);
			var target = new Simple();
			var proxy = generator.CreateInterfaceProxyWithTarget<ISimple>(target, interceptor);

			proxy.Method();

			Assert.AreEqual(3, target.Count);
		}