public static IEnumerable <TypePlanning> GetTypePlannings() { var repository = new TypePlanningReadRepository(new DataContext(new PersistenceConfiguration(RepositoryTestsHelper.ConnectionString))); var result = repository.ListAsync(null, null, null).Result; return(result); }
public async Task ListShouldReturnAllRecords() { //Arrange RepositoryHelper.ForTypePlanning.CreateTypePlanning("code-1", "name", "source"); RepositoryHelper.ForTypePlanning.CreateTypePlanning("code-2", "name", "source"); RepositoryHelper.ForTypePlanning.CreateTypePlanning("code-3", "name", "source"); // Act var result = await _repository.ListAsync(null, null, null); // Assert result.Should().NotBeNull(); }