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

Source from the content-addressed store, hash-verified

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