Example #1
0
        [Test] public void CreateGenericProxy()
        {
            InvocationHandlerImpl handler = new InvocationHandlerImpl();
            ClassGenerator        cg      = new ClassGenerator(typeof(IThingy), handler);
            IThingy thingy = (IThingy)cg.Generate();

            handler.expectedMethodName = "NoArgs";

            thingy.NoArgs();

            Assertion.Assert("Should have been called ", handler.wasCalled);
        }
Example #2
0
		[Test] public void CreateGenericProxy()
		{
			InvocationHandlerImpl handler = new InvocationHandlerImpl();
			ClassGenerator cg = new ClassGenerator(typeof(IThingy), handler);
			IThingy thingy = (IThingy)cg.Generate();

			handler.expectedMethodName = "NoArgs";

			thingy.NoArgs();

			Assertion.Assert("Should have been called ", handler.wasCalled);
		}