MCPcopy Create free account
hub / github.com/AGenUI/AGenUI / TEST

Function TEST

tests/cpp/surface/message_parser_test.cpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13// ============================================================================
14
15TEST(MessageParserCreateSurface, Success_AllFields) {
16 json j = {{"createSurface", {
17 {"surfaceId", "s1"},
18 {"catalogId", "cat1"},
19 {"sendDataModel", true},
20 {"animated", false}
21 }}};
22 CreateSurfaceMessage msg;
23 EXPECT_EQ(AGenUIMessageParser::parseCreateSurfaceData(j.dump(), msg), agenui::Execute_Success);
24 EXPECT_EQ(msg.surfaceId, "s1");
25 EXPECT_EQ(msg.catalogId, "cat1");
26 EXPECT_TRUE(msg.sendDataModel);
27 EXPECT_FALSE(msg.animated);
28}
29
30TEST(MessageParserCreateSurface, Success_OnlyRequired) {
31 json j = {{"createSurface", {{"surfaceId", "s2"}}}};

Callers

nothing calls this directly

Calls 3

dumpMethod · 0.80
emptyMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected