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

Source from the content-addressed store, hash-verified

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