Exemplo n.º 1
0
        private CarPoolingDbContext loadData()
        {
            var context = getContext();

            context.Group.AddRange(GroupsMother.GetGroups(null));
            context.SaveChanges();
            return(context);
        }
Exemplo n.º 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());
        }
Exemplo n.º 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);
        }