Test SortJsonByKey
| 19 | |
| 20 | // Test SortJsonByKey |
| 21 | TEST_F(JsonSortByKeyTest, TestSortJsonByKey_Success) |
| 22 | { |
| 23 | std::string inputJson = R"({"b": "valueB", "a": "valueA"})"; |
| 24 | auto result = m_jsonHandler.SortJsonByKey(inputJson, {}, {}, ' ', 4); |
| 25 | |
| 26 | ASSERT_TRUE(result.success); |
| 27 | ASSERT_EQ(result.response, "{\n \"a\": \"valueA\",\n \"b\": \"valueB\"\n}"); |
| 28 | } |
| 29 | |
| 30 | TEST_F(JsonSortByKeyTest, TestSortJsonByKey_InvalidJson) |
| 31 | { |
nothing calls this directly
no test coverage detected