Environment: VS2010 Premium official release, framework 3.5
Trying to mock a simple static function generates an exception "Ambiguous match found.". This seems like basic functionality but we have only been able to mock Interfaces. I tried searching for known issues, but couldn't seem to find bug reporting or anything on JustMock.Below is the sample code:
public class Foo
{
public static string StaticFunction(int x)
{
return x.ToString();
}
}
Mock.CreateStatic<Foo>();
Mock.Arrange(() => Foo.StaticFunction(10)).Returns("ten");
//above line generates "Ambiguous match found" exception
string s = Foo.StaticFunction(1);
Assert.IsTrue(s == "ten");