How to Mock the ActivityContext Class

301 Views Asked by At

I wanted to mock the System.Activities.NativeActivityContext & System.Activities.ActivityContext for my unit test.

i.e.

using Moq;
using Autofac.Extras.Moq;

var executionContext = new Mock<NativeActivityContext>();

Since this class does not have zero parameter constructor, I'm unable to mock, neither not able to create object for this.

This is the definition of NativeActivityClass which does not have constructor defined

Note: Looks Like there is no constructor defined in this class

Can anyone help me how to mock or create object of this classes?

0

There are 0 best solutions below