private CarPoolingDbContext loadData() { var context = getContext(); context.Group.AddRange(GroupsMother.GetGroups(null)); context.SaveChanges(); return(context); }
public async void GetUnsaggineds() { // Arrange var repository = getRepository(); // Act var groups = await repository.GetUnsagginedsAsync(); // Assert Assert.Equal(GroupsMother.GetGroups(null).Count(), groups.Count()); }
public async void GetEmptyUnsaggineds() { // Arrange var context = getContext(); context.Group.AddRange(GroupsMother.GetGroups(1)); context.SaveChanges(); var repository = new GroupRepository(context); // Act var groups = await repository.GetUnsagginedsAsync(); // Assert Assert.Empty(groups); }