import { SectorRepository } from '@app/domain/sectors/sector.repository';
import { Observable, of } from 'rxjs';
import { Sector } from '@app/domain/sectors/sector.model';
import { fakeSectors } from '@app/testing/sector.mock';

export class FakeSectorRepository implements SectorRepository {
  getOne(sectorId: string): Observable<Sector> {
    const sector = fakeSectors.find((s) => s.id === sectorId) ?? ({} as Sector);
    return of(sector);
  }

  list(): Observable<Sector[]> {
    return of(fakeSectors);
  }
}
