Moq invoking base class instead of inherited class on setup function
I am creating a c# background service with the following definition
Moq invoking base class instead of inherited class on setup function
I am creating a c# background service with the following definition
Moq invoking base class instead of inherited class on setup function
I am creating a c# background service with the following definition
Moq invoking base class instead of inherited class on setup function
I am creating a c# background service with the following definition
How to use a mocked object in a Moq callback (or other method)?
I’m mocking the following interface:
Mock and verify request object passed to PostAsJsonAsync
Is there are way to verify the request object passed to HttpClient.PostAsJsonAsync. The request object is constructed inside the method to be unit tested. Therefore I need to verify that the request object is constructed with correct values.
Why mock is returning the missing property?
I am not sure what I am doing wrong but here is the scenario for which I am trying to write the unit test using NUnit
, MOQ
in C#
Using Moq how can I setup a method that has an out parameter with that out parameter returing a mock of another interface?
I have an interface that has a method which has an out parameter which is another interface. Something like this: