#[test]
fn dust_impact_ejecta_high_lofting() {
    let d = deimoss::environment::dust::DustEnvironment::impact_ejecta();
    assert!(d.lofting_probability > 0.8);
}

#[test]
fn dust_adhesion_risk_bounded() {
    let d = deimoss::environment::dust::DustEnvironment::settled_regolith();
    let risk = d.adhesion_risk(100.0);
    assert!(risk > 0.0 && risk <= 1.0);
}

#[test]
fn radiation_nominal_positive() {
    let r = deimoss::environment::radiation::RadiationEnvironment::nominal_surface();
    assert!(r.effective_daily_dose_msv() > 0.0);
}

#[test]
fn radiation_sheltered_lower() {
    let nominal = deimoss::environment::radiation::RadiationEnvironment::nominal_surface();
    let sheltered = deimoss::environment::radiation::RadiationEnvironment::sheltered(5.0);
    assert!(sheltered.effective_daily_dose_msv() < nominal.effective_daily_dose_msv());
}

#[test]
fn annual_dose_positive() {
    let r = deimoss::environment::radiation::RadiationEnvironment::nominal_surface();
    let annual = deimoss::environment::radiation::annual_crew_dose_msv(r);
    assert!(annual > 300.0);
}

#[test]
fn thermal_shadowed_is_min() {
    let t = deimoss::environment::thermal::ThermalEnvironment {
        local_time_hours: 15.0,
        latitude_deg: 0.0,
        shadowed: true,
    };
    assert!((t.surface_temperature_k() - deimoss::MIN_SURFACE_TEMP_K).abs() < 1e-9);
}

#[test]
fn thermal_cycle_span_positive() {
    let span = deimoss::environment::thermal::thermal_cycle_span_k(0.0);
    assert!(span > 0.0);
}
