Exemple #1
0
        public async Task Test_JobCreateAndDelete()
        {
            BL_Job businessLogic = new BL_Job(null, true);


            Job newjob = new Job()
            {
                JobTitle    = ".NET Developer",
                Description = ".NET Developer Description",
                CreatedAt   = DateTime.Now,
                ExpiredAt   = DateTime.Now.AddDays(30)
            };

            await businessLogic.CreateJob(newjob);

            var exists = businessLogic.JobExists(newjob.IdJob);

            //Assert.AreEqual(true, exists);

            await businessLogic.DeleteJob(newjob);

            exists = businessLogic.JobExists(newjob.IdJob);

            Assert.AreEqual(false, exists);
        }
Exemple #2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var job = await businessLogicJob.GetJob(id);

            await businessLogicJob.DeleteJob(job);

            return(RedirectToAction(nameof(Index)));
        }