Exemple #1
0
        public void TestMethodNulls()
        {
            var     t = new TestWrapper();
            dynamic w = new DynamicProxy(t);

            string r = w.EchoInternal(null);

            Assert.Equal("Internal: ", r);

            r = w.EchoInternal2(1);
            Assert.Equal("Int: 1", r);
            r = w.EchoInternal2("Test");
            Assert.Equal("String: Test", r);

            r = w.EchoInternal2("Test", "Testing");
            Assert.Equal("Name: Test Value: Testing", r);

            r = w.EchoInternal2("Test", null);
            Assert.Equal("Name: Test Value: ", r);


            r = w.EchoInternal3("Test", "Testing", null);
            Assert.Equal("Name: Test Value: Testing Value2: ", r);

            r = w.EchoInternal3("Test", 1, null);
            Assert.Equal("Name: Test Value: 1 Value2: ", r);
        }