Exemple #1
0
        private CarPoolingDbContext loadData()
        {
            var context = getContext();

            context.Group.AddRange(GroupsMother.GetGroups(null));
            context.SaveChanges();
            return(context);
        }
Exemple #2
0
        public async void GetUnsaggineds()
        {
            // Arrange
            var repository = getRepository();

            // Act
            var groups = await repository.GetUnsagginedsAsync();

            // Assert
            Assert.Equal(GroupsMother.GetGroups(null).Count(), groups.Count());
        }
Exemple #3
0
        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);
        }