NHibernate TDD with oracle in ASP.Net

血红的双手。 提交于 2019-12-25 04:55:30

问题


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.

Please give suggestions...


回答1:


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.

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.

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.

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.



来源:https://stackoverflow.com/questions/2178439/nhibernate-tdd-with-oracle-in-asp-net

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