Mono for Android: Which Testing Frameworks work(适用于 Android 的 Mono:哪些测试框架有效)
问题描述
我创建了一个 Mono for Android VS2010 项目并添加了 NUnit 测试.
I have created a Mono for Android VS2010 project and added NUnit tests.
根据 Xamarin 的这篇文章,Android 的 Mono 似乎不支持 NUnit:https://bugzilla.novell.com/show_bug.cgi?id=644813
It seems Mono for Android does not support NUnit according to this post from Xamarin: https://bugzilla.novell.com/show_bug.cgi?id=644813
在 Mono for Android 项目中是否有任何测试框架可以运行?
Are there any testing frameworks that do run when in a Mono for Android project?
推荐答案
不,nunit 不工作,任何其他框架也不工作.monodroid 和 monotouch 的目的是提供一个 .net 开发环境,使您可以轻松地在不同环境之间移植业务逻辑.因此,您无法真正测试 android/ios 特定代码,但可以测试通用 .net 业务逻辑代码.在我编写的 monodroid 项目中,我在解决方案中创建了 3 个项目,一个是 android 项目,另一个是一个 .net 库,其中包含我所有的非 android 特定逻辑,最终项目是一个针对 .网络图书馆.然后我将我的逻辑代码文件添加到带有链接文件的 android 项目中.monodroid 项目文件无法测试,但链接到 monodroid 项目的 .net 代码文件可以使用您选择的任何框架进行测试.
no, nunit does not work nor do any other frameworks. the intent of monodroid and monotouch is to provide a .net development environment that allows you to easily port business logic between different environments. as a result you can't really test android/ios specific code, but you can test generic .net business logic code. in the monodroid projects that i write, i create 3 projects in the solution, one is the android project, another is a .net library that holds all of my non-android specific logic and the final project is a nUnit test library against the .net library. I then add my logic code files into the android project with linked files. monodroid project files can not be tested, but .net codes files linked into monodroid projects can be tested with what ever framework you choose.
这篇关于适用于 Android 的 Mono:哪些测试框架有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:适用于 Android 的 Mono:哪些测试框架有效
基础教程推荐
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01