// Tests for mecha10_behavior_runtime::status

use mecha10_behavior_runtime::NodeStatus;

#[test]
fn test_is_complete() {
    assert!(NodeStatus::Success.is_complete());
    assert!(NodeStatus::Failure.is_complete());
    assert!(!NodeStatus::Running.is_complete());
}

#[test]
fn test_status_checks() {
    assert!(NodeStatus::Success.is_success());
    assert!(!NodeStatus::Success.is_failure());
    assert!(!NodeStatus::Success.is_running());

    assert!(!NodeStatus::Failure.is_success());
    assert!(NodeStatus::Failure.is_failure());
    assert!(!NodeStatus::Failure.is_running());

    assert!(!NodeStatus::Running.is_success());
    assert!(!NodeStatus::Running.is_failure());
    assert!(NodeStatus::Running.is_running());
}

#[test]
fn test_display() {
    assert_eq!(NodeStatus::Success.to_string(), "Success");
    assert_eq!(NodeStatus::Failure.to_string(), "Failure");
    assert_eq!(NodeStatus::Running.to_string(), "Running");
}

#[test]
fn test_default() {
    assert_eq!(NodeStatus::default(), NodeStatus::Running);
}
