()
| 104 | |
| 105 | #[test] |
| 106 | fn parse_graph_traverse_json_works() { |
| 107 | let json = r#"{ |
| 108 | "nodes": [{"id":"a","depth":0},{"id":"b","depth":1}], |
| 109 | "edges": [{"from":"a","to":"b","label":"KNOWS"}] |
| 110 | }"#; |
| 111 | let sg = parse_graph_traverse_json(json).unwrap(); |
| 112 | assert_eq!(sg.node_count(), 2); |
| 113 | assert_eq!(sg.edge_count(), 1); |
| 114 | assert_eq!(sg.edges[0].label, "KNOWS"); |
| 115 | } |
| 116 | |
| 117 | #[test] |
| 118 | fn parse_empty_search_json() { |
nothing calls this directly
no test coverage detected