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

            return(jobService.CreateJob(jobRepo, jobInfo));
        }
        public void CreateJobMockTest()
        {
            //Arrange
            IJobCRUD       jobRepo    = new JobCRUDRepositoryMock();
            JobCRUDService jobService = new JobCRUDService();
            JobInfo        jobInfo    = new JobInfo()
            {
                JobNumber        = 1,
                JobTitlePosition = "Data Scientist",
                JobDescription   = "A data scientist is a professional responsible for collecting, analyzing and interpreting extremely large amounts of data.",
                CreatedAt        = DateTime.Now,
                ExpiresAt        = DateTime.Now.AddDays(3)
            };
            //Act
            JobInfo result = jobService.CreateJob(jobRepo, jobInfo);

            //Assert
            Assert.NotNull(result);
        }