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

            context.Group.AddRange(GroupsMother.GetGroups(null));
            context.SaveChanges();
            return(context);
        }
예제 #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());
        }
예제 #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);
        }