import { FakeSectorRepository } from '@app/testing/domain/sectors/fake-sector.repository';
import { fakeSectors } from '@app/testing/sector.mock';
import { GetSectorUseCase } from '@app/application/sectors/get-sector.usecase';

describe('ListSectorUsecase', () => {
  let useCase: GetSectorUseCase;
  let repo: FakeSectorRepository;

  beforeEach(() => {
    repo = new FakeSectorRepository();
    useCase = new GetSectorUseCase(repo);
  });

  it('doit retourne la liste des secteurs ', () => {
    const sectorId = '1';
    useCase.execute(sectorId).subscribe((sector) => {
      expect(sector).toBe(fakeSectors.find((s) => s.id === sectorId));
    });
  });
});
