小编Mar*_*ero的帖子

存根readOnly属性的行为

public interface ICell
        {
            int Value{get;}

            void IncrementValue();
        }
Run Code Online (Sandbox Code Playgroud)

我想在RhinoMocks中为这个接口创建一个存根.我有一个只读属性,我想每次调用IncrementValue()方法时增加它的值.这可能吗?我不想为这个存根创建一个新类.

c# rhino-mocks stub

5
推荐指数
1
解决办法
762
查看次数

标签 统计

c# ×1

rhino-mocks ×1

stub ×1