lundi 21 septembre 2020

How can I test the XML deserialization of a dotnet-core WCF client?

I've inherited an existing WCF client built with https://github.com/dotnet/wcf which I now need to modify, and as such want to get it under test to avoid regressions.

To get this under test I want to inject a known response from the server (in the form of a fixed XML response) instead of having the service under test connect to the production endpoint. Once I have that I can then validate that the correct values are returned from the generated WCF client.

Is there a hook somewhere I can use with the WCF client to provide the fake XML response? Any other suggestions for how to test the deserialization?


(also asked here https://github.com/dotnet/wcf/issues/4370)

Aucun commentaire:

Enregistrer un commentaire