public async Task <ActionResult> GetAllInstitutes()
        {
            var presenter = new InstituteListPresenter();
            await _getInstituteListUseCase.Handle(GetInstituteListUseCaseRequest.CreateAllInstitutesRequest(), presenter);

            return(presenter.ContentResult);
        }
        public void TestGetAllInstituteFromEmptyRepository()
        {
            var useCase    = new GetInstituteListUseCase(new InMemoryInstituteRepository());
            var outputPort = new OutputPort();

            Assert.True(useCase.Handle(GetInstituteListUseCaseRequest.CreateAllInstitutesRequest(), outputPort).Result);
            Assert.Empty(outputPort.Institute);
        }
        public void TestGetAllInstitutes()
        {
            var useCase    = new GetInstituteListUseCase(CreateRoteRepository());
            var outputPort = new OutputPort();

            Assert.True(useCase.Handle(GetInstituteListUseCaseRequest.CreateAllInstitutesRequest(), outputPort).Result);
            Assert.Equal <int>(4, outputPort.Institute.Count());
            Assert.Equal(new long[] { 1, 2, 3, 4 }, outputPort.Institute.Select(o => o.Id));
        }