Esempio n. 1
0
        public async Task GetAllAsync_Should_Fail_Gracefully_On_Exception()
        {
            //Arrange
            _sut = new ProductQuery(ProductDbContextBuilder.InitEmptyContext(), loggerMock.Object, mapperMock.Object, commandMock.Object);

            //Act
            var result = await _sut.GetAllAsync();

            //Assert
            result.IsSuccess.ShouldBeFalse();
            //loggerMock.Verify(x => x.LogInformation("An error was thrown"),Times.Once);
        }