嗨我正在寫流利Nhibernate的單元測試,當我跑它通過isloation的測試,但是當我運行多個測試。或運行測試不止一次它開始與下面 System.ApplicationException消息失敗:類型對於屬性「ID」預期「1」類型「System.Int32」,但有「2」「System.Int32」Fluent Nhibernate System.ApplicationException:對於屬性'Id'期待類型'System.Int32'的'1'但得到類型'System.Int32'的'2'
[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")
}