Ejemplo n.º 1
0
        public JobInfo UpdateJob(JobInfo jobInfo)
        {
            IJobCRUD       jobRepo    = new JobCRUDRepository(_context);
            JobCRUDService jobService = new JobCRUDService();

            return(jobService.UpdateJob(jobRepo, jobInfo));
        }
        public void UpdateJobMockTest()
        {
            //Arrange
            IJobCRUD       jobRepo    = new JobCRUDRepositoryMock();
            JobCRUDService jobService = new JobCRUDService();
            JobInfo        jobInfo    = new JobInfo()
            {
                JobNumber        = 2,
                JobTitlePosition = "Software Developer",
                JobDescription   = "A software developer is a company or person that creates software - either completely, or with other companies or people.",
                CreatedAt        = DateTime.Now,
                ExpiresAt        = DateTime.Now.AddDays(3)
            };
            //Act
            JobInfo result = jobService.UpdateJob(jobRepo, jobInfo);

            //Assert
            Assert.NotNull(result);
        }