| 1146 | |
| 1147 | #[test] |
| 1148 | fn test_agent_registry_register_unregister() { |
| 1149 | let registry = AgentRegistry::new(); |
| 1150 | let initial_count = registry.len(); |
| 1151 | |
| 1152 | // Register custom agent |
| 1153 | let custom = AgentDefinition::new("custom", "Custom agent"); |
| 1154 | registry.register(custom); |
| 1155 | assert_eq!(registry.len(), initial_count + 1); |
| 1156 | assert!(registry.exists("custom")); |
| 1157 | |
| 1158 | // Unregister |
| 1159 | assert!(registry.unregister("custom")); |
| 1160 | assert_eq!(registry.len(), initial_count); |
| 1161 | assert!(!registry.exists("custom")); |
| 1162 | |
| 1163 | // Unregister non-existent |
| 1164 | assert!(!registry.unregister("nonexistent")); |
| 1165 | } |
| 1166 | |
| 1167 | #[test] |
| 1168 | fn test_agent_registry_list_visible() { |