嗨,我正在为流利的 Nhibernate 编写单元测试,当我在隔离中运行测试时它通过了,但是当我运行多个测试时。或多次运行测试,它开始失败并显示 System.ApplicationException 下面的消息:对于属性“Id”预期“1”类型为“System.Int32”但得到“2”类型为“System.Int32”
[TextFixture] 公共无效 Can_Correctly_Map_Entity() {
new PersistenceSpecification<UserProfile>(Session)
.CheckProperty(c => c.Id, 1)
.CheckProperty(c => c.UserName, "user")
.CheckProperty(c => c.Address1, "Address1")
.CheckProperty(c => c.Address2, "Address2")
}