… in NH2.1.2.
Consider: // Calories is of type float .CheckProperty (serving => serving.Nutrition.Calories, 400) "Expected '400' but got '400' for Property 'NutritionCalories'" vs "For property 'Nutrition.Calories' expected '400' of type 'System.Int32' but got '400' of type 'System.Single'." Changes: - Improve the error message - Fixup tests that check the exception message - Fix PropertyChain to append "." when appending the property chain together.
…n to the entity-level one and add tests. If there is no property-level equality comparer the code will fall-back to the entity-level comparer and if neither are set simply to Object.Equals. An example: new PersistenceSpecification<Food> (base.Session, new EntityLevelEqualityComparer ()) .CheckProperty (food => food.Image, new Bitmap (20, 20), new BitmapEqualityComparer ()) .CheckProperty (food => food.Brand, "banana") .VerifyTheMappings (); Here for the property Image the BitmapEqualityComparer will be used and for the property Brand the EntityLevelEqualityComparer.
…ces when testing components or one-to-one references. E.g.: new PersistenceSpecification<User> (base.Session) .CheckProperty (user => user.Preferences.DailyCaloriesTarget, 1500) Without this commit Fluent NHibernate will throw trying to set the value on "user.DailyCaloriesTarget" instead of “user.Preferences.DailyCaloriesTarget”. It is important to note that your POCOs have to internally initialize the nested objects/components at construction. Otherwise you should be using CheckReference instead. The fix involves the following refactoring: - Refactor Testing.Values.*Property to wrap a property Accessor instead of a PropertyInfo directly, because unlike the PropertyInfo the Accessor infrastructure already handles chained property references. - Refactor PersistenceSpecificationExtensions(...) to call ReflectionHelper.GetAccessor instead of ReflectionHelper.GetProperty(...) so that we get an Accessor instead of a PropertyInfo to store. - Fixup the unit tests to use Accessor instead of PropertyInfo.
…etting a value that is already specified
…olumns weren't getting mapped if the property was on a base class
…or each type of mapping element to check, and a set of extension methods
… etc) would be ignored if used from an automapping override.
…s resolves issue #347
…et on key-property elements of a composite-id. Issue #346
…ore.autocrlf issues now.
…an control the column attributes. Resolves issue #341.