I want to mock the value of Utils.IsLocalEnv to be false. How can I do it using C# in unit tests?
I tried this: Utils.IsLocalEnv = () => true;
but get wrong.
public static class Utils
{
public static bool IsLocalEnv()
{
if (aspNetCoreEnv.ToLower() == "development")
{
return true;
}
return false;
}
}