Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }