本文介绍了vs 2010中的单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨 我最近开始从事一个项目,在该项目中,我必须从数据库中检索数据.我想对我的代码进行完全的单元测试,并且我想知道我应该采取哪些步骤来做到这一点,例如我该如何进行模拟,将连接字符串放在哪里? 在此先谢谢您.
Hi I''ve recently started working on a project in which I have to retrieve data from a database. I''m looking to fully unit test my code, and I''d like to know what steps I should take to do this, e.g. how would I go about mocking this up, where do I put the connection string? Thanks in advance.
推荐答案hello,有关连接字符串的更多知识,请检查该链接: 连接字符串 [ ^ ] 然后取决于您如何浏览数据,您可以使用datasourse并绑定数据...使用该链接 数据源 [ ^ ] 问候. hello , for more knowledge about connection strings you check that link : connection string[^] and then it depends on you how to browse your data,, you can use datasourse and bind you data ... using that link datasource[^] regards..
更多推荐
vs 2010中的单元测试
发布评论