()
| 12 | |
| 13 | #[test] |
| 14 | fn test_basic_node_patterns() { |
| 15 | let fixture = TestFixture::with_fraud_data().expect("Failed to create test fixture"); |
| 16 | |
| 17 | // Test anonymous node pattern |
| 18 | fixture.assert_first_value( |
| 19 | "MATCH () RETURN count(*) as node_count", |
| 20 | "node_count", |
| 21 | Value::Number(70.0), |
| 22 | ); |
| 23 | |
| 24 | // Test named node pattern |
| 25 | fixture.assert_first_value( |
| 26 | "MATCH (n) RETURN count(n) as named_nodes", |
| 27 | "named_nodes", |
| 28 | Value::Number(70.0), |
| 29 | ); |
| 30 | |
| 31 | // Test labeled node pattern |
| 32 | fixture.assert_first_value( |
| 33 | "MATCH (a:Account) RETURN count(a) as accounts", |
| 34 | "accounts", |
| 35 | Value::Number(50.0), |
| 36 | ); |
| 37 | |
| 38 | // Test multiple label pattern |
| 39 | fixture.assert_query_succeeds("INSERT (test:Person:Employee {name: 'John', role: 'Manager'})"); |
| 40 | |
| 41 | fixture.assert_first_value( |
| 42 | "MATCH (pe:Person:Employee) RETURN count(pe) as person_employees", |
| 43 | "person_employees", |
| 44 | Value::Number(1.0), |
| 45 | ); |
| 46 | |
| 47 | // Test node pattern with properties |
| 48 | let result = fixture.assert_query_succeeds( |
| 49 | "MATCH (a:Account {status: 'active'}) RETURN count(a) as active_accounts", |
| 50 | ); |
| 51 | assert!(!result.rows.is_empty()); |
| 52 | |
| 53 | // Test node pattern with property constraints |
| 54 | let result = fixture.assert_query_succeeds( |
| 55 | "MATCH (a:Account {status: 'active', account_type: 'checking'}) |
| 56 | RETURN count(a) as active_checking", |
| 57 | ); |
| 58 | assert!(!result.rows.is_empty()); |
| 59 | } |
| 60 | |
| 61 | #[test] |
| 62 | fn test_relationship_patterns() { |
nothing calls this directly
no test coverage detected