Relative Content

Tag Archive for c#moq

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.