()
| 311 | |
| 312 | #[test] |
| 313 | fn test_complex_pattern_matching() { |
| 314 | let fixture = TestFixture::new().expect("Failed to create test fixture"); |
| 315 | // Setup fresh graph for this test to avoid interference |
| 316 | fixture |
| 317 | .setup_graph("test_complex_pattern_matching") |
| 318 | .expect("Failed to setup graph"); |
| 319 | // Re-insert fraud data since we have a fresh graph |
| 320 | fixture |
| 321 | .insert_fraud_data() |
| 322 | .expect("Failed to insert fraud data"); |
| 323 | |
| 324 | // Test 1: Multi-hop patterns |
| 325 | let result = fixture.assert_query_succeeds( |
| 326 | "MATCH (a1:Account)-[:Transaction]->(m:Merchant)<-[:Transaction]-(a2:Account) RETURN count(DISTINCT m) as shared_merchants" |
| 327 | ); |
| 328 | assert!(!result.rows.is_empty()); |
| 329 | |
| 330 | // Test 2: Simple pattern with filtering |
| 331 | let result = fixture.assert_query_succeeds( |
| 332 | "MATCH (a:Account)-[t:Transaction]->(m:Merchant) WHERE t.amount > 50 RETURN a.name, count(t) as high_value_txns ORDER BY high_value_txns DESC LIMIT 10" |
| 333 | ); |
| 334 | assert!(!result.rows.is_empty()); |
| 335 | |
| 336 | // Test 3: Simple relationship patterns |
| 337 | let result = fixture.assert_query_succeeds( |
| 338 | "MATCH (a:Account)-[:Transaction]->(m:Merchant) WHERE a.balance > 2000 RETURN count(DISTINCT m) as merchant_count" |
| 339 | ); |
| 340 | assert!(!result.rows.is_empty()); |
| 341 | } |
| 342 | |
| 343 | #[test] |
| 344 | fn test_with_clause_basic_aggregation() { |
nothing calls this directly
no test coverage detected