MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_resolve_node_ids_variable

Function test_resolve_node_ids_variable

atomic-repository/src/query_plan.rs:669–680  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

667
668 #[test]
669 fn test_resolve_node_ids_variable() {
670 let mut bindings = HashMap::new();
671 bindings.insert(
672 "results".to_string(),
673 vec![
674 KgNode::new("intent:PIMO-1", Class::WorkIntent, "PIMO-1", "test"),
675 KgNode::new("intent:PIMO-2", Class::WorkIntent, "PIMO-2", "test"),
676 ],
677 );
678 let ids = resolve_node_ids("$results", &bindings);
679 assert_eq!(ids, vec!["intent:PIMO-1", "intent:PIMO-2"]);
680 }
681
682 #[test]
683 fn test_resolve_node_ids_missing_variable() {

Callers

nothing calls this directly

Calls 2

resolve_node_idsFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected