()
| 91 | |
| 92 | #[tokio::test] |
| 93 | async fn test_remove_node() { |
| 94 | let mut graph = WorkflowGraph::new(); |
| 95 | |
| 96 | let node = WorkflowNode::new( |
| 97 | "Existing Node", |
| 98 | "A node that exists", |
| 99 | NodeType::Agent { |
| 100 | config: AgentNodeConfig::new(AgentId::new(), "Test prompt"), |
| 101 | }, |
| 102 | ); |
| 103 | |
| 104 | let node_id = node.id.clone(); |
| 105 | graph.add_node(node).unwrap(); |
| 106 | |
| 107 | assert_eq!(graph.node_count(), 1); |
| 108 | |
| 109 | graph.remove_node(&node_id).unwrap(); |
| 110 | assert_eq!(graph.node_count(), 0); |
| 111 | assert!(graph.get_node(&node_id).is_none()); |
| 112 | } |
| 113 | |
| 114 | #[tokio::test] |
| 115 | async fn test_add_edge() { |
nothing calls this directly
no test coverage detected