1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2025 ReifyDB
//! Testing utilities for FFI operators
//!
//! This module provides a comprehensive test harness for testing FFI operators
//! without the complexity of the FFI boundary. It includes test contexts,
//! state stores, data builders, and assertion helpers.
//!
//! # Example
//!
//! ```ignore
//! use reifydb_flow_operator_sdk::testing::*;
//!
//! #[test]
//! fn test_my_operator() {
//! let mut harness = OperatorTestHarness::<MyOperator>::builder()
//! .with_config([("key", Value::Utf8("value"))])
//! .build()?;
//!
//! let input = TestChangeBuilder::new()
//! .insert_row(RowNumber(1), vec![Value::Int8(42i64)])
//! .build();
//!
//! let output = harness.apply(input)?;
//!
//! assert_eq!(output.diffs.len(), 1);
//! harness.assert_state("my_key", Value::Int8(42i64));
//! }
//! ```