locked
How to Moq a method in C# whose input parameter is of type Enum? RRS feed

  • Question

  • How to Moq a method in C# whose input parameter is of type Enum?

     Moq.MockRepository mock = new Moq.MockRepository(MockBehaviour.Loose);
        var myInstance =mock.Create<IMyMethod>();
        myInstance.SetUp(x=>x.myMethod(It.IsAny<**`EnumType`**>).Verifiable();
    

    How to Give ENUMType here


    BSK

    • Moved by CoolDadTx Friday, November 6, 2020 7:36 PM Third Party Product
    Friday, November 6, 2020 4:16 PM

All replies

  • You could post to the UT forum for help.

    https://docs.microsoft.com/en-us/answers/topics/vs-testing.html

    Friday, November 6, 2020 4:50 PM