Esempio n. 1
0
        public void Properties_should_be_settable_through_dynamic()
        {
            //Assert
            var     javascriptObject = new JavascriptObject();
            dynamic dyn = javascriptObject;

            dyn.a = 1;
            dyn.b = "c";
            javascriptObject.ShouldBeEquivalentTo(new Dictionary <string, object>()
            {
                { "a", 1 },
                { "b", "c" }
            });
        }
Esempio n. 2
0
        public void Should_act_like_dictionary()
        {
            var javascriptObject = new JavascriptObject
            {
                { "a", 1 },
                { "b", "c" }
            };

            javascriptObject.ShouldBeEquivalentTo(new Dictionary <string, object>()
            {
                { "a", 1 },
                { "b", "c" }
            });
        }