Example #1
0
        public void TestExpando2()
        {
            dynamic NewD = new DynamicObjects.Builder<ExpandoObject>();

            var tExpandoNamedTest = NewD.Robot(
                LeftArm: "Rise",
                RightArm: "Clamp"
                );

            dynamic NewE = new Expando();

            var tExpandoNamedTestShortcut = NewE.Robot(
               LeftArm: "Rise",
               RightArm: "Clamp"
               );

            Assert.AreEqual("Rise", tExpandoNamedTestShortcut.LeftArm);
            Assert.AreEqual("Clamp", tExpandoNamedTestShortcut.RightArm);

            Assert.AreEqual(tExpandoNamedTest.LeftArm, tExpandoNamedTestShortcut.LeftArm);
            Assert.AreEqual(tExpandoNamedTest.RightArm, tExpandoNamedTestShortcut.RightArm);
            Assert.AreEqual(tExpandoNamedTest.GetType(), tExpandoNamedTestShortcut.GetType());
        }
Example #2
0
        public void TestExpando2()
        {
            dynamic NewD = new DynamicObjects.Builder <ExpandoObject>();

            var tExpandoNamedTest = NewD.Robot(
                LeftArm: "Rise",
                RightArm: "Clamp"
                );

            dynamic NewE = new Expando();

            var tExpandoNamedTestShortcut = NewE.Robot(
                LeftArm: "Rise",
                RightArm: "Clamp"
                );

            Assert.AreEqual("Rise", tExpandoNamedTestShortcut.LeftArm);
            Assert.AreEqual("Clamp", tExpandoNamedTestShortcut.RightArm);

            Assert.AreEqual(tExpandoNamedTest.LeftArm, tExpandoNamedTestShortcut.LeftArm);
            Assert.AreEqual(tExpandoNamedTest.RightArm, tExpandoNamedTestShortcut.RightArm);
            Assert.AreEqual(tExpandoNamedTest.GetType(), tExpandoNamedTestShortcut.GetType());
        }
Example #3
0
        public void TestBuilder()
        {
            var New = Builder.New <ExpandoObject>();

            var tExpando = New.Object(
                Test: "test1",
                Test2: "Test 2nd"
                );

            Assert.AreEqual("test1", tExpando.Test);
            Assert.AreEqual("Test 2nd", tExpando.Test2);

            dynamic NewD = new DynamicObjects.Builder <ExpandoObject>();


            var tExpandoNamedTest = NewD.Robot(
                LeftArm: "Rise",
                RightArm: "Clamp"
                );

            Assert.AreEqual("Rise", tExpandoNamedTest.LeftArm);
            Assert.AreEqual("Clamp", tExpandoNamedTest.RightArm);
        }
Example #4
0
        public void TestBuilder()
        {
            var New = Builder.New<ExpandoObject>();

            var tExpando = New.Object(
                Test: "test1",
                Test2: "Test 2nd"
                );
            Assert.AreEqual("test1", tExpando.Test);
            Assert.AreEqual("Test 2nd", tExpando.Test2);

            dynamic NewD = new DynamicObjects.Builder<ExpandoObject>();

            var tExpandoNamedTest = NewD.Robot(
                LeftArm: "Rise",
                RightArm: "Clamp"
                );

            Assert.AreEqual("Rise", tExpandoNamedTest.LeftArm);
            Assert.AreEqual("Clamp", tExpandoNamedTest.RightArm);
        }