NHibernate 用NUint 进行单元测试出错
出错,没有找到测试类MyNHibernateFixture
Failure: TestFixtureSetUp failed in MyNHibernateFixture
请高手帮忙解决!谢谢
------解决方案--------------------按Ctrl+F搜索下MyNHibernateFixture是否定义。
------解决方案--------------------我引用的是 NHibernate-3.3.0.GA-bin
开发工具vs2010,开发工具.net 3.5
using NHibernate;
using MyNHibernate.DAL;
using MyNHibernate.DomainModel.Entities;
using NUnit.Framework;
namespace MyNHibernate.TestDemo
{
[TestFixture]
public class MyNHibernateFixture
{
NHibernateHelper _helper;
SessionManage _getSession;
ISession _isession;
[TestFixtureSetUp]
public void TestFixtureSetup()
{
_getSession = new SessionManage();
//helper = new NHibernateHelper(_session.GetISession());
}
[SetUp]
public void Setup()
{
_isession = _getSession.GetISession();
_helper = new NHibernateHelper(_isession);
}
[Test]
public object GetCustomerByIdTest()
{
var tempCutomer = new Customer { Firstname = "沈", Lastname = "容泉" };
object obj = _helper.AddCustomer(tempCutomer);
return obj;
}
}