public void GetAllShouldReturnEmptyList() { var repository = new EfDeletableEntityRepository <Hall>(new ApplicationDbContext(this.options.Options)); var service = new HallsService(repository); var result = service.GetAll <TestHallViewModel>(); Assert.Empty(result); }
public async Task GetAllShouldReturnCorrectData() { var repository = new EfDeletableEntityRepository <Hall>(new ApplicationDbContext(this.options.Options)); var service = new HallsService(repository); await service.AddAsync(this.hall); await service.AddAsync(this.hall); var result = service.GetAll <TestHallViewModel>(); Assert.Equal(2, result.Count()); Assert.Equal(ProjectionType.TwoD, result.FirstOrDefault().ProjectionType); }