Hi,
I am trying to Mock a static method from a class that is static too,
This static method calls another statics method of the same class,
example:
For some reason when I try to Mock method A like this:
I am trying to Mock a static method from a class that is static too,
This static method calls another statics method of the same class,
example:
public static string MethodStaticA()
{
return MethodStaticB();
}
public static string MethodStaticB()
{
//Make something
}
For some reason when I try to Mock method A like this:
Mock.SetupStatic(typeof(MfsUtils));
Mock.Arrange(() => MfsUtils.MethodStaticA()).Returns("MyString"); I can see in the logs that actually is calling to MethodStaticB() and I do not want to call it How can we properly mock this??