Пример #1
0
        public void MakeSingleQuotes_notTouch()
        {
            var result = JsonProgram.MakeSingleQuotes(new string[] { "test" }, "\"test\": 1, \"test4\": 2");

            Assert.AreEqual("'test': 1, \"test4\": 2", result);
        }
Пример #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);
        }
Пример #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);
        }