I need to test the CheckWarehouseAvailability
private method in an abstract class.
public abstract class BaseAPI
{
private void CheckWarehouseAvailability(Order order)
{
//codes here
}
}
public class Processor : BaseAPI
{
}
Here is my TestMethod
Processor pro = new Processor();
PrivateObject privBase = new PrivateObject(pro, new PrivateType(typeof(BaseAPI)));
var retVal = privBase.Invoke("CheckWarehouseAvailability(order)");
Assert.AreEqual(true, retVal);
When I run the test method, I got this error: An exception of type 'System.MissingMethodException' occured in mscorlib.dll but was not handled in user code