public async Task GetPatternByIdShouldGetPattern()
        {
            var patternId = 1;
            var pattern   = new Pattern {
                Id = patternId
            };

            _projectBLMock.Setup(x => x.GetPatternByIDAsync(It.IsAny <int>())).Returns(Task.FromResult(pattern));
            var patternController = new PatternController(_projectBLMock.Object);
            var result            = await patternController.GetPatternByIDAsync(patternId);

            Assert.Equal(patternId, ((Pattern)((OkObjectResult)result).Value).Id);
            _projectBLMock.Verify(x => x.GetPatternByIDAsync(patternId));
        }
        public async Task GetPatternByIdAsync_ShouldReturnNotFound_WhenPatternIsNull()
        {
            //arrange
            var     patternID = 1;
            Pattern pattern   = null;

            _projectBLMock.Setup(i => i.GetPatternByIDAsync(patternID)).ReturnsAsync(pattern);
            PatternController patternController = new PatternController(_projectBLMock.Object);

            //act
            var result = await patternController.GetPatternByIDAsync(patternID);

            //assert
            Assert.IsType <NotFoundResult>(result);
        }