怎么样在Nunit 中找到config文件
来源:互联网 发布:chrome 插件 知乎 编辑:程序博客网 时间:2024/04/29 01:28
One area that was difficult to figure out relative to NUnit was how to use external configuration files. Normally, you can define a Web.config file for ASP.NET Web applications and application .config files for executables. What can you do when NUnit requires a .DLL assembly and your code has been written to use a configuration file, however? The answer is to create a configuration file for testing.
Recall that NUnit creates an instance of the AppDomain for the .DLL you are testing. One of the other things it does is to manually look for an assembly.dll.config file. Thus, if you need configuration options for your application, copy those settings into a .config file for testing. In our example, such a .config file would be MyMath.dll.config, placed in the same directory as the test DLL loaded by NUnit.
To learn more about AppDomains, assemblies, Reflection, and configuration files, pick up a copy of my new book The Visual Basic .NET Developer's Book from Addison-Wesley (available Spring 2003, ISBN: 0672324075).
- 怎么样在Nunit 中找到config文件
- 在RAC环境中,怎么样找到错误的数据文件
- Nunit工程读取web.config文件
- 解决“在web config 中没有找到连接字符串”
- 在vs2008中使用nunit
- 在VS2005中集成NUnit
- 怎么样在ASP.NET2.0中用web.config文件链接数据库啊?
- APP红海中怎么样找到出路
- 在Web.Config文件中使用configSource
- 在.Config文件中自定义配置节
- 在Web.config文件中映射控件
- 在.NET中添加App.config文件
- 在Web.config文件中表示“&”字符
- 如何在AndroidStduio中找到R文件
- 在linux系统中怎么样查找到大文件?
- 在Dotnetnuke4.5中进行NUnit
- 在Silverlight项目中使用Nunit框架
- 在web.config中配置实现可以上传大文件
- eclipse使用技巧
- 翻译RFC3550-3.定义(definitions)
- Code Assist功能介绍
- SqlDataSource数据源控件参数问题
- 某个程序安装已在安装计算机上创建挂起的文件操作" 解决办法
- 怎么样在Nunit 中找到config文件
- 死亡之旅——创业篇
- 防止IT项目延迟的18条军规
- WEB入侵的过程jsp
- 释名
- javascript中的cookie使用(javascript权威指南)
- SQL高手篇:精妙SQL语句介绍
- cooking处理
- 通过脚本将网址添加到客户的受信任站点