我在hibernate.cfg.xml中有这个配置:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.connection_string">Data Source=.\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=SSPI;</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
我刚刚创建了一个类库,并使用MBUnit创建了一个集成测试。它失败了。报告的一部分
认为
够了)到这里:
** NO TESTS WERE RUN (No tests found) **
TestCase 'M:IntegrationTests.RepositoryTests.ListAllPostsReturnsAListOfPost'
failed: The ProxyFactoryFactory was not configured.
Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers.
我已经阅读了许多教程,但还没有看到这个代理工厂配置。有必要具体说明吗?如果是的话,我该怎么做?我需要参考其他图书馆吗?