import { describe, it, expect } from 'vitest';
import { LeagueSeasonSummaryViewModel } from './LeagueSeasonSummaryViewModel';

describe('LeagueSeasonSummaryViewModel', () => {
  it('exposes required fields from input', () => {
    const input = {
      seasonId: 'season-1',
      name: 'Season 1',
      status: 'active',
      isPrimary: true,
      isParallelActive: false,
    };

    const vm = new LeagueSeasonSummaryViewModel(input);

    expect(vm.seasonId).toBe('season-1');
    expect(vm.name).toBe('Season 1');
    expect(vm.status).toBe('active');
    expect(vm.isPrimary).toBe(true);
    expect(vm.isParallelActive).toBe(false);

    expect(typeof vm.seasonId).toBe('string');
    expect(typeof vm.name).toBe('string');
    expect(typeof vm.status).toBe('string');
    expect(typeof vm.isPrimary).toBe('boolean');
    expect(typeof vm.isParallelActive).toBe('boolean');
  });

  it('keeps booleans as booleans even when false', () => {
    const vm = new LeagueSeasonSummaryViewModel({
      seasonId: 'season-2',
      name: 'Season 2',
      status: 'archived',
      isPrimary: false,
      isParallelActive: false,
    });

    expect(vm.isPrimary).toBe(false);
    expect(vm.isParallelActive).toBe(false);
    expect(typeof vm.isPrimary).toBe('boolean');
    expect(typeof vm.isParallelActive).toBe('boolean');
  });
});