首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > PSMock is a .NET mock framework capable of mocking all functions and properties.

PSMock is a .NET mock framework capable of mocking all functions and properties.

  • 资源大小:29.72 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: .net tdd unittesting Mock 3.5

资 源 简 介

PSMock PSMock is yet another .NET mock framework, but capable of mocking all functions and properties in a class. I.e. it is not necessary to crate mocked objects based on interfaces or virtual functions. The initial implementation is depending on the PostSharp framework to inject mock functionality into classes or function calls. Sample A sample on how a test function mocks an instance function: ``` using (Mock.Mocking) { // Verify that the unmocked Echo function returns the in-parameter as the result EchoClass mocked = new EchoClass(); Assert.That(mocked.Echo("real"), Is.EqualTo("real")); // Setup the mocked function to return "mock" regardless of the in-parameter using (Mock.Setup) { Mock.Function(mocked.Echo(null)) .Return("mock"); } // Verify that specified mocked return value is returned Assert.That(mocked.Echo("real&quo

文 件 列 表

PSMock_0.5.0_src
Build.bat
Build.proj
License.txt
PSMock
PSMock.sln
PSMockTest
readme.txt
Samples
SamplesTest

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 猕猴桃 3小时前 成为了本站会员

  • 11 7小时前 成为了本站会员

  • 开心快活人 10小时前 成为了本站会员

  • 晋财 11小时前 成为了本站会员

  • WYG 1天前 成为了本站会员

  • Shine 1天前 成为了本站会员

  • 柳贻 1天前 成为了本站会员

  • hallelujah_HL 1天前 成为了本站会员

  • 焦昱贺 1天前 成为了本站会员

  • Rubin 1天前 成为了本站会员

5.908390s