// Tests for mecha10_cli::handlers::validate

use mecha10_cli::handlers::validate::*;

#[test]
fn test_validate_args() {
    let args = ValidateArgs {
        target: ValidateTarget::All,
        strict: true,
    };

    assert_eq!(args.target, ValidateTarget::All);
    assert!(args.strict);
}

#[test]
fn test_validate_target_from_str() {
    assert_eq!(ValidateTarget::from_str("project"), Some(ValidateTarget::Project));
    assert_eq!(ValidateTarget::from_str("config"), Some(ValidateTarget::Config));
    assert_eq!(ValidateTarget::from_str("simulation"), Some(ValidateTarget::Simulation));
    assert_eq!(ValidateTarget::from_str("sim"), Some(ValidateTarget::Simulation));
    assert_eq!(ValidateTarget::from_str("all"), Some(ValidateTarget::All));
    assert_eq!(ValidateTarget::from_str("invalid"), None);
}
