Ejemplo n.º 1
0
        public void GetSkills_calls_ProgrammerRepository_with_given_id(string expectedSkills)
        {
            var id = "programmer id";
            var programmerRepository = Substitute.For <INetworkRepository>();

            programmerRepository.GetById(id).Returns(new Programmer(id, null, new[] { expectedSkills }));
            var skillsService = new SkillsService(programmerRepository);
            var skills        = skillsService.GetSkills(id);

            Assert.That(skills, Is.EqualTo(new[] { expectedSkills }));
        }
Ejemplo n.º 2
0
        public void GetSkillsTest()
        {
            //Arrange
            SkillsService service = new SkillsService(_unitOfWork.Object);

            //Act
            var result = service.GetSkills();

            //Assert
            Assert.That(result.Count, Is.EqualTo(2));
            Assert.That(result[1].Name, Is.EqualTo("Databases"));
            Assert.That(result[1].Skills[1].Name, Is.EqualTo("Oracle"));
        }
Ejemplo n.º 3
0
        public void OnGet()
        {
            SkillsService service = new SkillsService();

            Kenntnisse = service.GetSkills();
        }