I tried to reproduce the issue on my side, unfortunately with no success. Executing the same test of yours resulted with correctly returned collection. I have shown this in the attached Screenshot1.png.
To be able to continue investigating the issue on my side, I will require a sample project that can reproduce it. Please, if it is possible send me such project with your next message.
Another thing you can try is to drop the
class and directly arrange expectations to the
class. Then, to execute the protected method you can use the PrivateAccessor
coming with JustMock. I have prepared an example that should give you more detailed explanation:
BatchManager mockBatchManager = Mock.Create<BatchManager>(Behavior.CallOriginal);
Mock.Arrange(() => mockBatchManager.StorageInventoryService.GetDestinationStatus(Arg.IsAny<List<
var privateacc =
Let me know if you can send me the sample project or the workaround doesn't work on your side. In both ways I will assist you further.
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums
, or our JustTrace