Exemplo n.º 1
0
        public void Proxy_catch_exception()
        {
            var thing   = TemplateProxyGenerator.GenerateType <ClassToProxy>();
            int outcome = thing.ThrowException();

            Assert.Equal(outcome, 42);
        }
Exemplo n.º 2
0
        public void Proxy_alter_outcome()
        {
            var thing   = TemplateProxyGenerator.GenerateType <ClassToProxy>();
            int outcome = thing.ReturnThirteen();

            Assert.Equal(outcome, 19);
        }