I created a fake assembly called MyProject.Web.Customer.Fakes from the project MyProject.Web.Customer. I am trying to call Read method of the MyProject.Web.Customer from its fake object from the test method.The fake class there is a method I have given my code. I am trying to call the method 'Read()' using ShimCustObject.AllInstance.Read. I am looking for some one help. Thanks
{
[Serializable]
Public abstract class CustObject
{
public ArrayList Read()
{
return this.Read("Cust")
}
public ArrayList Read(string arrayattributes)
{
return this.Read("Cust")
}
}
}
In Test project I am trying to call the method Read()
using microsoft.qualitytools.testing.fakes
using MyProject.Web.Customer
using MyProject.Web.Customer.Fakes
namespace MyProject.Web.Customer.Test
{
[TestMethod]
public void myTest()
{
using (ShimsContext.Create()) {
//How can I call CustObject Read method using ShimCustObject.AllInstance.Read
}
}
}