Files
k-photos/crates/domain/tests/entities/processing_pipeline.rs

18 lines
613 B
Rust

use domain::entities::ProcessingPipeline;
use domain::value_objects::{StructuredData, SystemId};
#[test]
fn steps_ordered() {
let mut pipeline = ProcessingPipeline::new("asset.created");
assert!(pipeline.steps.is_empty());
pipeline.add_step(SystemId::new(), StructuredData::new());
pipeline.add_step(SystemId::new(), StructuredData::new());
pipeline.add_step(SystemId::new(), StructuredData::new());
assert_eq!(pipeline.steps.len(), 3);
assert_eq!(pipeline.steps[0].step_order, 0);
assert_eq!(pipeline.steps[1].step_order, 1);
assert_eq!(pipeline.steps[2].step_order, 2);
}