Is there a way to explicitly set property values using Fluent nHibernate’s PersistenceSpecification
Consider the following:
Guid expectedId = Guid.NewGuid();
new PersistenceSpecification<MyClass>(session)
.CheckProperty(c => c.ID, expectedId , //some delegate here?)
.VerifyTheMappings();
In the constructor for MyClass, the ID is set.
However, I’d like to overwrite that in my test, by explicitly setting it to expectedId
One of the overloads for CheckProperty has a propertySetter delegate, however I can’t find any documentation on it?
.CheckProperty()will use the second parameter to set it before saving and to compare it after loading again, so it is already setting the expectedId.