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:708–719  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

706
707 #[test]
708 fn test_registry_require_not_found() {
709 let mut registry = AgentRegistry::new();
710 registry.register(Box::new(MockAgent::new("alpha")));
711 let err = registry.require("beta").unwrap_err();
712 match err {
713 AgentError::AgentNotFound { name, available } => {
714 assert_eq!(name, "beta");
715 assert!(available.contains("alpha"));
716 }
717 other => panic!("Expected AgentNotFound, got: {:?}", other),
718 }
719 }
720
721 #[test]
722 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