Ejemplo n.º 1
0
        public void MakeSingleQuotes_notTouch()
        {
            var result = JsonProgram.MakeSingleQuotes(new string[] { "test" }, "\"test\": 1, \"test4\": 2");

            Assert.AreEqual("'test': 1, \"test4\": 2", result);
        }
Ejemplo n.º 2
0
        public void MakeSingleQuotes_ifQuoted()
        {
            var result = JsonProgram.MakeSingleQuotes(new string[] { "test", "test4" }, "\"test\": \"test2\", \"test4\": \"test5\"");

            Assert.AreEqual("'test': 'test2', 'test4': 'test5'", result);
        }
Ejemplo n.º 3
0
        public void MakeSingleQuotes_ifNotQuoted()
        {
            var result = JsonProgram.MakeSingleQuotes(new string[] { "test", "test4" }, "\"test\": 1, \"test4\": 2");

            Assert.AreEqual("'test': 1, 'test4': 2", result);
        }