Exemple #1
0
        public void GetProfileById_ProfileExist_ShouldBeRecieved()
        {
            Mock <IUnitOfWork>       uow     = new Mock <IUnitOfWork>();
            ProgrammerProfileService service = new ProgrammerProfileService(uow.Object);

            uow.Setup(a => a.ProgrammerProfiles.Get(It.IsAny <string>())).Returns(new ProgrammerProfile());
            service.Get(It.IsAny <string>());
        }
Exemple #2
0
        public void GetProfileById_InvalidProfileId_ShouldBeThrownValidationException()
        {
            Mock <IUnitOfWork>       uow     = new Mock <IUnitOfWork>();
            ProgrammerProfileService service = new ProgrammerProfileService(uow.Object);

            uow.Setup(a => a.ProgrammerProfiles.Get(It.IsAny <string>())).Returns((ProgrammerProfile)null);
            service.Get(It.IsAny <string>());
        }