public async Task GetAllSkills_ReturnsAllSkills_Always()
        {
            //Arrange

            var cSharp = new Skill()
            {
                Id = Guid.NewGuid().ToString(), Name = "C#"
            };
            var javascript = new Skill()
            {
                Id = Guid.NewGuid().ToString(), Name = "javascript"
            };

            await _skillRepository.UpsertAsync(cSharp);

            await _skillRepository.UpsertAsync(javascript);

            //Act
            var skills = await _skillsService.GetAllSkillsAsync();

            //Assert
            Assert.AreEqual(2, skills.Count());
            Assert.AreEqual(cSharp, skills.First());
            Assert.AreEqual(javascript, skills.Last());
        }
Exemple #2
0
 public async Task <IEnumerable <Skill> > GetSkills()
 {
     return(await _skillsService.GetAllSkillsAsync());
 }