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>()); }
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>()); }