use super::*;

#[test]
fn loads_snapshot_as_outcome() {
    let snapshot = FinanceSnapshot {
        policy: rrt_model::finance::AnnualFinancePolicy {
            dividends_allowed: false,
            ..rrt_model::finance::AnnualFinancePolicy::default()
        },
        company: CompanyFinanceState::default(),
    };
    let path = write_temp_json("snapshot", &snapshot);

    let outcome = load_finance_outcome(&path).expect("snapshot should load");
    assert_eq!(outcome.evaluation.decision, AnnualFinanceDecision::NoAction);

    let _ = fs::remove_file(path);
}
