MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_registry_require_not_found

Function test_registry_require_not_found

atomic-agent/src/hooks/mod.rs:621–632  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

619
620 #[test]
621 fn test_registry_require_not_found() {
622 let mut registry = AgentRegistry::new();
623 registry.register(Box::new(MockAgent::new("alpha")));
624 let err = registry.require("beta").unwrap_err();
625 match err {
626 AgentError::AgentNotFound { name, available } => {
627 assert_eq!(name, "beta");
628 assert!(available.contains("alpha"));
629 }
630 other => panic!("Expected AgentNotFound, got: {:?}", other),
631 }
632 }
633
634 #[test]
635 fn test_registry_register_replaces_duplicate() {

Callers

nothing calls this directly

Calls 2

registerMethod · 0.45
requireMethod · 0.45

Tested by

no test coverage detected