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

Function TEST

tests/cpp/function_call/functioncall_config_test.cpp:11–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9// ============================================================================
10
11TEST(FunctionCallConfigFromJson, AllFields) {
12 json j = {
13 {"namespace", "agenui.platform"},
14 {"name", "toast"},
15 {"description", "Show a toast"},
16 {"returnType", "object"}
17 };
18 auto config = FunctionCallConfig::fromJson(j);
19 EXPECT_EQ(config.getNamespace(), "agenui.platform");
20 EXPECT_EQ(config.getName(), "toast");
21 EXPECT_EQ(config.getDescription(), "Show a toast");
22 EXPECT_EQ(config.getReturnType(), "object");
23}
24
25TEST(FunctionCallConfigFromJson, WithoutNamespace) {
26 json j = {

Callers

nothing calls this directly

Calls 10

emptyMethod · 0.80
setNamespaceMethod · 0.80
setNameMethod · 0.80
setDescriptionMethod · 0.80
setReturnTypeMethod · 0.80
containsMethod · 0.80
getNameMethod · 0.45
toJsonMethod · 0.45
isValidMethod · 0.45
getFullNameMethod · 0.45

Tested by

no test coverage detected