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

Source from the content-addressed store, hash-verified

651
652 #[test]
653 fn test_registry_require_not_found() {
654 let mut registry = AgentRegistry::new();
655 registry.register(Box::new(MockAgent::new("alpha")));
656 let err = registry.require("beta").unwrap_err();
657 match err {
658 AgentError::AgentNotFound { name, available } => {
659 assert_eq!(name, "beta");
660 assert!(available.contains("alpha"));
661 }
662 other => panic!("Expected AgentNotFound, got: {:?}", other),
663 }
664 }
665
666 #[test]
667 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