Exemplo n.º 1
0
        public void StringWithQuotesInListToStringTest()
        {
            var obj = new VObject(new List <VObject> {
                "hello\\\""
            });

            Assert.AreEqual(obj.ToString(), "[\"hello\\\\\\\"\"]");
        }
Exemplo n.º 2
0
        public void ListToStringTest3()
        {
            var obj = new VObject(new List <VObject> {
                "hello", "abc", "world"
            });

            Assert.AreEqual(obj.ToString(), "[\"hello\", \"abc\", \"world\"]");
        }
Exemplo n.º 3
0
        public void ListToStringTest2()
        {
            var obj = new VObject(new List <VObject> {
                1, "abc", 2
            });

            Assert.AreEqual(obj.ToString(), "[1, \"abc\", 2]");
        }
Exemplo n.º 4
0
        public void NestedListToStringTest()
        {
            var obj = new VObject(new List <VObject> {
                new List <VObject> {
                    1
                }, new List <VObject> {
                    2, 3
                }
            });

            Assert.AreEqual(obj.ToString(), "[[1], [2, 3]]");
        }
Exemplo n.º 5
0
        public void StringToStringTest(string str, string expected)
        {
            var obj = new VObject(str);

            Assert.AreEqual(obj.ToString(), expected);
        }
Exemplo n.º 6
0
        public void NumberToStringTest(double num, string expected)
        {
            var obj = new VObject(num);

            Assert.AreEqual(obj.ToString(), expected);
        }