Hi,
I have a private method called "method1" as follows:
public class Myclass : IMyclass{
private void method1(IList<class1> class1List)
{
//body
}
}
I want to verify this method was called in my test method in the test project. following is my test method:
[TestMethod]
public void TestMethod1()
{
//Arrange
Myclass myClass1= new Myclass(x, y);
//Act
myClass1.Method2(para1);
//Assert
IList<class1> class1List= new List<class1>(); //Assume this list has values
Isolate.Verify.NonPublic.WasCalled(myClass1, "method1").WithArguments(class1List);
}
but Once I run the test method i got the following error:
TypeMock Verification: Method A.B.C.....Myclass.method1() was expected but was not called
But this "method1()" was called in the "myClass1.Method2(para1)" when i was debugging.
Can somebody tell me where I'm wrong?
Thanks
Niluka