Пример #1
0
        public async Task Details_ReturnsHttpNotFound_ForInvalidId()
        {
            // Arrange
            _mockService.MockGetByIdAsync(_testProductId, null);

            // Act
            var result = await _controller.Details(_testProductId);

            // Assert
            Assert.IsType <NotFoundResult>(result);
            _mockService.VerifyGetByIdAsync(Times.Once);
        }