use crate::lighting::effects::*;
use crate::lighting::engine::tests::common::create_test_fixture;
use crate::lighting::engine::EffectEngine;
use std::collections::HashMap;
use std::time::Duration;
#[test]
fn test_effect_engine_creation() {
let engine = EffectEngine::new();
assert_eq!(engine.active_effects_count(), 0);
}
#[test]
fn test_fixture_registration() {
let mut engine = EffectEngine::new();
let fixture = create_test_fixture("test_fixture", 1, 1);
engine.register_fixture(fixture);
let mut parameters = HashMap::new();
parameters.insert("dimmer".to_string(), 0.5);
let effect = EffectInstance::new(
"test_effect".to_string(),
EffectType::Static {
parameters,
duration: Duration::from_secs(5),
},
vec!["test_fixture".to_string()],
None,
None,
None,
);
assert!(engine.start_effect(effect).is_ok());
}