I have tried using the initializers and am still seeing failures when running it with other tests in my solution.
I've create a new test (mine being the only test that exist so there are no other calls being made that may intercept).
Here is the following scenario I'm facing:
I have a static class Foo
I have a static method FooMethod
I have a static property FooProperty -> This is the unit test I've created
public static string FooMethod(string s)
public static boolean FooProperty
var v = FooMethod(somestring);
In my test, I am trying to mock the FooMethod that returns a string value
public void UnitTest
Mock.Create(typeof(Foo)); //I'm noticing that I do not need to create anything and my tests will still pass.
Mock.Arrange( () => Foo.FooMethod(Arg.IsAny<String>())).IgnoreInstance().Returns("string");
bool b = Foo.FooProperty;