Pipeline run fail as unit test ci task fire exeption
Failed Microsoft.eShopWeb.UnitTests.MediatorHandlers.OrdersTests.GetOrderDetails.NotBeNullIfOrderExists [80 ms]
Error Message:
Assert.NotNull() Failure
Stack Trace:
at Microsoft.eShopWeb.UnitTests.MediatorHandlers.OrdersTests.GetOrderDetails.NotBeNullIfOrderExists() in /home/vsts/work/1/s/tests/UnitTests/MediatorHandlers/OrdersTests/GetOrderDetails.cs:line 38
--- End of stack trace from previous location ---
Failed Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTests.AddItemToBasket.InvokesBasketRepositoryUpdateAsyncOnce [239 ms]
Error Message:
Moq.MockException :
Expected invocation on the mock once, but was 0 times: x => x.UpdateAsync(Basket, CancellationToken)
Contact Details
No response
What happened?
Exercise : 01 Task: 01 Step: 07
Description of issue:
Pipeline run fail as unit test ci task fire exeption
Quickly verifying the source code of imported project, I find that the mock of unit test is for "GetBySpecAsync"
but a recent commit to the project changed the tested method to use "FirstOrDefaultAsync"
Repro steps: Run the created pipeline
Lab
Enable Dynamic Configuration and Feature Flags
Relevant screenshots
No response
Do you want to help us? 👏