()
| 430 | |
| 431 | #[test] |
| 432 | fn test_error_handling() { |
| 433 | let fixture = TestFixture::new().expect("Failed to create test fixture"); |
| 434 | // Setup fresh graph for this test to avoid interference |
| 435 | fixture |
| 436 | .setup_graph("test_error_handling") |
| 437 | .expect("Failed to setup graph"); |
| 438 | // Re-insert simple data since we have a fresh graph |
| 439 | fixture |
| 440 | .insert_simple_data() |
| 441 | .expect("Failed to insert simple data"); |
| 442 | |
| 443 | // Test syntax errors |
| 444 | fixture.assert_query_fails("MATCH (n:TestNode WHERE n.value > 10", "Parse error"); |
| 445 | |
| 446 | // Test invalid syntax (missing RETURN) |
| 447 | fixture.assert_query_fails("MATCH (n:TestNode) WHERE n.value > 10", "Parse error"); |
| 448 | |
| 449 | // Test type errors |
| 450 | fixture.assert_query_fails("MATCH (n:TestNode) WHERE n.name > 100 RETURN n", ""); |
| 451 | } |
| 452 | |
| 453 | #[test] |
| 454 | fn test_transaction_consistency() { |
nothing calls this directly
no test coverage detected