I'm trying to write a wrapper class for a protected method which I wish to unit test. The problem in my case is that the original method is declared as protected static new which prevents me from accessing the base method because it's static.
Is there any other way to write this wrapper method? If not which other options do I have to unit test this method without changing its scope?
EDIT: Code Added:
public class DerivedClassToTest : BaseClass
{
protected static new Type_A MehodeToTest()
{
Type_A A = new Type_A
{
//DoSomething...
};
return A;
}
}
How do i test MehodeToTest?
I tried to derive from the DerivedClassToTest in my Unitest so i can access the Protected methode but its static so i cant call base.MethodeToTest. How do i access the MethodeToTest
Thank you.
newkeyword...private-protectedmethods. Only the thepublicones.