MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / assertValidRequestJson

Method assertValidRequestJson

tests/utils/test_fixtures.cpp:355–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void TestAssertions::assertValidRequestJson(const nlohmann::json& request) {
356 EXPECT_TRUE(request.contains("model")) << "Request missing model field";
357 EXPECT_TRUE(request.contains("messages")) << "Request missing messages field";
358 EXPECT_TRUE(request["messages"].is_array()) << "Messages should be array";
359 EXPECT_FALSE(request["messages"].empty())
360 << "Messages array should not be empty";
361}
362
363void TestAssertions::assertHasRequiredFields(
364 const nlohmann::json& json,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected