问题描述
我正在ASP.Net中使用oracle开发NHibernate.现在我正在尝试TDD(测试驱动开发).您能告诉我用oracle为NHibernate开发TDD的最佳方法吗?我在Microdesk上使用了MbUnit,但是对于oracle而言,这不是更好的方法,但对于SQL Server来说却不是.
I am working on NHibernate with oracle in ASP.Net. Now i am trying TDD(Test Driven Development). Can you tell me the best way to develop the TDD for NHibernate with oracle?I am using MbUnit with microdesk but it is not better approach for oracle but SQL server.
请提出建议...
推荐答案
在谈论进行TDD时,是在谈论单元测试和集成测试.对于单元测试,根本不涉及数据库,因此任何测试工具都可以使用.
When you're talking about doing TDD, you're talking unit testing and integration testing. For unit testing there is no database involvement at all so any testing tools will work.
对于集成测试,使用本地数据库(例如SQLite)效率要高得多.通过使用本地数据库而不是某处的服务器,您将节省数小时的时间来等待测试运行.本文 http://scottmuc .com/blog/development/unit-testing-domain-persistence-with-ndbunit-nhibernate-and-sqlite/显示了如何轻松完成它.
For integration testing, it's much more efficient to use a local database such as SQLite. You will save yourself hours of sitting around waiting for the tests to run by using a local database instead of a server somewhere. This article http://scottmuc.com/blog/development/unit-testing-domain-persistence-with-ndbunit-nhibernate-and-sqlite/ shows how it can be done with very little effort.
您说您正在使用MicroDesk,所以我假设您是从Steve Bohlen和他的Summer of NHibernate系列中获得的.他实际上只是包装 ndbunit库,该库确实支持Oracle 9i或更高版本.真的很想走那条路.
You say you're using MicroDesk so I'm assuming you got this from Steve Bohlen and his Summer of NHibernate series. All he's doing is really just wrapping the ndbunit library that does support Oracle 9i or greater if you really want to go that route.
但是这些只是工具,而不是TDD. TDD是一种开发方法,它首先编写测试,然后从测试中驱动设计,而与语言,数据库,工具等无关.
But these are just tools and not TDD. TDD is a way of developing by writing the tests first and driving your design from the tests regardless of language, database, tool, etc.
这篇关于在ASP.Net中使用oracle的NHibernate TDD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!