I'm working on tests for my Fluent NHibernate mappings, and my question is - is it a good idea to test for id value if Id column is represented by identity in Sql Server? Since it changes after each insert, how can I possibly do it?
new PersistenceSpecification<Product>(session)
.CheckProperty(p => p.Id, 1)
.CheckProperty(p => p.Name, "Awesome hat")
.CheckProperty(p => p.Price, 9.90)
.CheckList(p => p.StoresStockedIn, new List<Store>())
.VerifyTheMappings();