MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_registry_execute

Function test_registry_execute

core/src/tools/registry.rs:402–415  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

400
401 #[tokio::test]
402 async fn test_registry_execute() {
403 let registry = ToolRegistry::new(PathBuf::from("/tmp"));
404
405 registry.register(Arc::new(MockTool {
406 name: "test".to_string(),
407 }));
408
409 let result = registry
410 .execute("test", &serde_json::json!({}))
411 .await
412 .unwrap();
413 assert_eq!(result.exit_code, 0);
414 assert_eq!(result.output, "mock output");
415 }
416
417 #[tokio::test]
418 async fn test_registry_execute_unknown() {

Callers

nothing calls this directly

Calls 2

registerMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected