Skip to main content

reifydb_core/testing/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2025 ReifyDB
3
4use crate::value::column::columns::Columns;
5
6/// A captured event dispatch during test execution.
7#[derive(Clone, Debug)]
8pub struct CapturedEvent {
9	pub sequence: u64,
10	pub namespace: String,
11	pub event: String,
12	pub variant: String,
13	pub depth: u8,
14	pub columns: Columns,
15}
16
17/// A captured handler invocation during test execution.
18#[derive(Clone, Debug)]
19pub struct CapturedInvocation {
20	pub sequence: u64,
21	pub namespace: String,
22	pub handler: String,
23	pub event: String,
24	pub variant: String,
25	pub duration_ns: u64,
26	pub outcome: String,
27	pub message: String,
28}
29
30/// Identifies the primitive type category for a `testing::*::changed()` generator.
31pub struct TestingChanged {
32	pub schema_type: &'static str,
33}
34
35impl TestingChanged {
36	pub fn new(schema_type: &'static str) -> Self {
37		Self {
38			schema_type,
39		}
40	}
41}