mardi 30 août 2016

How to mock a class that is constantly changing?

I have a class [XrmServiceContext][1], and it changes each time the CRM configuration changes.

My service class accepts it in its constructor:

public class fooService(XrmServiceContext xrmServiceContext)
{
   //implementation
}

I need to mock XrmServiceContext in order to set up expectations and verify behavior for my unit tests.

How do I mock this class in order to define behavior in my tests for fooService?

Aucun commentaire:

Enregistrer un commentaire