English 中文(简体)
How to use Microsoft built in Tests with NHibernate For Repository Layer(DAL)?
原标题:
  • 时间:2009-11-18 10:47:35
  •  标签:
  • mstest

Can any body tell me how to use Microsoft built in Tests with NHibernate For Repository Layer(DAL)?

问题回答

I m using NUNIT tests to test NH mappings. you create test (regular) that create objects, updates them and delete them. Just like any other test - you assert for the results by checking the DB after the operation. (if you delete an object, you should be able to "get" it... ect...)

I create a session in the beginning of each test, and close it at the end.

same goes to any other function the dal has...

NUnit website





相关问题
Invoke callback in Moq

I have a method that performs an asynchronous service call. I call this class by passing in the callback. public void GetRights(EventHandler<GetRightsCompletedEventArgs> callback) { ...

Fluent NHibernate PersistenceSpecification CheckList

I am currently working on a college project in which we are using Fluent NHibernate. I am working on figuring how to create testing for our entities and Fluent mappings. I have, however, hit a dead ...

Why does Assert.AreEqual(1.0, double.NaN, 1.0) pass?

Short question, why does Assert.AreEqual(1.0, double.NaN, 1.0) pass? Whereas Assert.AreEqual(1.0, double.NaN) fails. Is it a bug in MSTest (Microsoft.VisualStudio.QualityTools.UnitTestFramework) or ...

Migrate from MSTest to XUnit

We are thinking about moving our tests from MSTest to XUnit. Is there any migration application that takes a MSTest and migrates it to XUnit? Also, if not, what should I look out for when doing this?...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

Repeat mstest test run multiple times

Some of my mstest unit tests help detect multi-threading race conditions, and as such they are most useful when run many times in a row, but I only want to do this for specific test runs -- not all ...

热门标签