Moq (or possibly another framework) on Mono / MonoTouch

六月ゝ 毕业季﹏ 提交于 2019-12-03 06:57:35

I'm using Moq right now with Monodevelop to test the non-Monotouch parts of a Monotouch app, and I haven't had any trouble. For the target runtime, my test project and the code under test both use Mono / .NET 3.5, and for references, it's got:

  • System, Version=2.0.0
  • nunit.core, Version=2.4.8
  • nunit.framework, Version=2.4.8
  • [code under test]
  • System.Core, Version=3.5.0
  • Moq.dll

System, nunit.core and nunit.framework are all as provided by Monodevelop.

The Moq I'm using is Moq.4.0.10827/NET35/Moq.dll.

(I haven't had any luck NUnit-testing the Monotouch parts -- I assume because when the tests are running, there's no phone or simulator, so the native code Monotouch is wrapping can't run. I've had to separate out the non-iOS-specific parts of the app and set up two separate solutions, one for real builds and one for unit testing the parts that can be unit tested. If you've gotten farther than that, let me know!)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!