Hi I am writing unit tests for fluent Nhibernate, when I run the test in isloation it passes, but when I run multiple tests. or run the test more than once it starts failing with the message below System.ApplicationException : For property 'Id' expected '1' of type 'System.Int32' but got '2' of type 'System.Int32'
[TextFixture] public void 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")
}
I got a solution that seems to make sense here http://stackoverflow.com/questions/3188311/fluent-nhibernate-system-applicationexception-for-property-id-expected-1-of, but Im not sure how to use this as the explanation is vague