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

Source from the content-addressed store, hash-verified

680
681 #[test]
682 fn test_registry_require_not_found() {
683 let mut registry = AgentRegistry::new();
684 registry.register(Box::new(MockAgent::new("alpha")));
685 let err = registry.require("beta").unwrap_err();
686 match err {
687 AgentError::AgentNotFound { name, available } => {
688 assert_eq!(name, "beta");
689 assert!(available.contains("alpha"));
690 }
691 other => panic!("Expected AgentNotFound, got: {:?}", other),
692 }
693 }
694
695 #[test]
696 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