public void picks_up_searchable_attribute_on_properties() { var mapping = DocumentMapping.For <Organization>(); mapping.FieldFor(nameof(Organization.Name)).ShouldBeOfType <DuplicatedField>(); SpecificationExtensions.ShouldNotBeOfType <DuplicatedField>(mapping.FieldFor(nameof(Organization.OtherProp))); }
public void duplicate_a_field() { var mapping = DocumentMapping.For <User>(); mapping.DuplicateField(nameof(User.FirstName)); mapping.FieldFor(nameof(User.FirstName)).ShouldBeOfType <DuplicatedField>(); // other fields are still the same SpecificationExtensions.ShouldNotBeOfType <DuplicatedField>(mapping.FieldFor(nameof(User.LastName))); }