Ejemplo n.º 1
0
        public void All_WithNone_ReturnEmptyCollection()
        {
            var service = new AdminQualificationService(dbContext, userManager, roleManager, signInManager);

            IEnumerable <QualificationConciseViewModel> results = service.All();

            Assert.IsNotNull(results);
            Assert.AreEqual(0, results.ToList().Count);
        }
Ejemplo n.º 2
0
        public async Task All_WithSome_ReturnAll()
        {
            const string NAME_QUALIICATION = "TestQualification";
            await dbContext.Qualification.AddRangeAsync(
                new Qualification(NAME_QUALIICATION),
                new Qualification(NAME_QUALIICATION),
                new Qualification(NAME_QUALIICATION));

            await dbContext.SaveChangesAsync();

            var service = new AdminQualificationService(dbContext, userManager, roleManager, signInManager);

            IEnumerable <QualificationConciseViewModel> results = service.All();

            Assert.IsNotNull(results);
            Assert.AreEqual(3, results.ToList().Count);
        }