()
| 405 | |
| 406 | #[test] |
| 407 | fn encode_null_violation() { |
| 408 | let schema = crm_schema(); |
| 409 | let encoder = TupleEncoder::new(&schema); |
| 410 | |
| 411 | let values = vec![ |
| 412 | Value::Null, // id is NOT NULL |
| 413 | Value::String("x".into()), |
| 414 | Value::Null, |
| 415 | Value::Decimal(rust_decimal::Decimal::ZERO), |
| 416 | Value::Null, |
| 417 | ]; |
| 418 | |
| 419 | let err = encoder.encode(&values).unwrap_err(); |
| 420 | assert!(matches!(err, StrictError::NullViolation(ref s) if s == "id")); |
| 421 | } |
| 422 | |
| 423 | #[test] |
| 424 | fn encode_type_mismatch() { |
nothing calls this directly
no test coverage detected