public async void Task2_GetById_Return_NotFoundResult() { //Arrange var Id = 32; _context = new SDCContext(dbContextOptions); _controller = new JobTypesController(_context); //Act var result = await _controller.GetJobType(Id); //Assert Assert.IsType <NotFoundResult>(result); }
public async void Task1_GetById_Return_OkResult() { //Arrange var Id = 1; _context = new SDCContext(dbContextOptions); _controller = new JobTypesController(_context); //Act var result = await _controller.GetJobType(Id); //Assert Assert.IsType <OkObjectResult>(result); }