MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / test_remove_node

Function test_remove_node

tests/rust_integration_tests/graph_tests.rs:93–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91
92#[tokio::test]
93async 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]
115async fn test_add_edge() {

Callers

nothing calls this directly

Calls 3

cloneMethod · 0.80
remove_nodeMethod · 0.80
add_nodeMethod · 0.45

Tested by

no test coverage detected