我有一节课,如下所示。我想知道如何使用Typemock模拟这个类
public static class MyClass
{
public static string MyFunction()
{
}
}发布于 2013-06-21 22:36:20
静态方法模拟不需要特殊的语法。您应该能够像往常一样使用AAA语法。
Isolate.Fake.WhenCalled(() => MyClass.MyFunction()).WillReturn("mock");有一些great documentation about this on the Typemock site。
https://stackoverflow.com/questions/17234462
复制相似问题