import { FakeProjectRepository } from '@app/testing/domain/projects/fake-project.repository';
import { GetProjectUseCase } from '@app/application/projects/get-project.usecase';

describe('GetProjectUseCase', () => {
  let useCase: GetProjectUseCase;
  let repo: FakeProjectRepository;

  beforeEach(() => {
    repo = new FakeProjectRepository();
    useCase = new GetProjectUseCase(repo);
  });

  it("doit retourné le projet en fonction de l'id projet", (done) => {
    const projectId = '1';
    useCase.execute(projectId).subscribe((project) => {
      expect(project.id).toBe(projectId);
      done();
    });
  });
});
