Exemplo n.º 1
0
        public void TestConstructOptional()
        {
            PocoOptConstructor tCast = Dynamic.InvokeConstructor(typeof(PocoOptConstructor), new InvokeArg("three", "3"));

            Assert.AreEqual("-1", tCast.One);
            Assert.AreEqual("-2", tCast.Two);
            Assert.AreEqual("3", tCast.Three);
        }
Exemplo n.º 2
0
        public void TestConstructOptional()
        {
            PocoOptConstructor tCast = Impromptu.InvokeConstructor(typeof(PocoOptConstructor), "3".WithArgumentName("three"));

            Assert.AreEqual("-1", tCast.One);
            Assert.AreEqual("-2", tCast.Two);
            Assert.AreEqual("3", tCast.Three);
        }
Exemplo n.º 3
0
        public void TestConstructOptional()
        {
            var argname = InvokeArg.Create;


            PocoOptConstructor tCast = Dynamic.InvokeConstructor(typeof(PocoOptConstructor), argname("three", "3"));

            Assert.AreEqual("-1", tCast.One);
            Assert.AreEqual("-2", tCast.Two);
            Assert.AreEqual("3", tCast.Three);
        }