@@ -87,7 +87,7 @@ public ElasticClient ConfigureClient(Action<ConnectionSettings> settingsSelector
8787 return client ;
8888 }
8989
90- public IElasticClient ClientWithPropertiesFor < T > ( Action < FluentDictionary < Expression < Func < T , object > > , PropertyMapping > > propertiesSelector )
90+ public IElasticClient ClientWithPropertiesFor < T > ( Action < PropertyMappingDescriptor < T > > propertiesSelector )
9191 {
9292 return this . ConfigureClient ( c=> c . MapPropertiesFor < T > ( propertiesSelector ) ) ;
9393 }
@@ -96,7 +96,7 @@ public IElasticClient ClientWithPropertiesFor<T>(Action<FluentDictionary<Express
9696 public void SettingsTakePrecedenceOverAttributes ( )
9797 {
9898 var client = this . ClientWithPropertiesFor < MyCustomClass > ( props => props
99- . Add ( p=> p . MyProperty , "mahPropertah" )
99+ . Rename ( p=> p . MyProperty , "mahPropertah" )
100100 ) ;
101101 Expression < Func < SomeClass , object > > exp = ( m ) => m . MyCustomClass . MyProperty ;
102102 client . Infer . PropertyPath ( exp ) . Should ( ) . Be ( "myCustomClass.mahPropertah" ) ;
@@ -107,7 +107,7 @@ public void CanNotMapAnyDepth()
107107 {
108108 var e = Assert . Throws < ArgumentException > ( ( ) =>
109109 this . ClientWithPropertiesFor < SomeClass > ( props => props
110- . Add ( p=> p . MyCustomClass . MyProperty , "mahPropertah" )
110+ . Rename ( p=> p . MyCustomClass . MyProperty , "mahPropertah" )
111111 )
112112 ) ;
113113 e . Message . Should ( ) . Contain ( "can only map direct properties" ) ;
@@ -118,8 +118,8 @@ public void CanNotMapSamePropertyTwice()
118118 {
119119 var e = Assert . Throws < ArgumentException > ( ( ) =>
120120 this . ClientWithPropertiesFor < MyCustomClass > ( props => props
121- . Add ( p=> p . MyProperty , "mahPropertah" )
122- . Add ( p=> p . MyProperty , "mahPropertah2" )
121+ . Rename ( p=> p . MyProperty , "mahPropertah" )
122+ . Rename ( p=> p . MyProperty , "mahPropertah2" )
123123 )
124124 ) ;
125125 e . Message . Should ( )
@@ -134,10 +134,10 @@ public void CanNotMapSamePropertyTwice_SubClasses()
134134 var e = Assert . Throws < ArgumentException > ( ( ) =>
135135 this . ConfigureClient ( c=> c
136136 . MapPropertiesFor < B > ( props => props
137- . Add ( p=> p . X , "bX" )
137+ . Rename ( p=> p . X , "bX" )
138138 )
139139 . MapPropertiesFor < C > ( props => props
140- . Add ( p=> p . X , "cX" )
140+ . Rename ( p=> p . X , "cX" )
141141 )
142142 )
143143 ) ;
@@ -152,10 +152,10 @@ public void ResolverShouldResolveAllNestedMembers()
152152 {
153153 var client = this . ConfigureClient ( c=> c
154154 . MapPropertiesFor < SomeClass > ( props => props
155- . Add ( p=> p . MyCustomClass , "customClazz" )
155+ . Rename ( p=> p . MyCustomClass , "customClazz" )
156156 )
157157 . MapPropertiesFor < MyCustomClass > ( props => props
158- . Add ( p=> p . MyProperty , "mahPropertah" )
158+ . Rename ( p=> p . MyProperty , "mahPropertah" )
159159 )
160160 ) ;
161161 Expression < Func < SomeClass , object > > exp = ( m ) => m . MyCustomClass . MyProperty ;
@@ -167,10 +167,10 @@ public void ResolverShouldResolveAllNestedMembers_Dictionary()
167167 {
168168 var client = this . ConfigureClient ( c=> c
169169 . MapPropertiesFor < SomeClass > ( props => props
170- . Add ( p=> p . StringDict , "map" )
170+ . Rename ( p=> p . StringDict , "map" )
171171 )
172172 . MapPropertiesFor < SomeOtherClass > ( props => props
173- . Add ( p=> p . CreateDate , "d0b" )
173+ . Rename ( p=> p . CreateDate , "d0b" )
174174 )
175175 ) ;
176176 Expression < Func < SomeClass , object > > exp = ( m ) => m . StringDict [ "path" ] . CreateDate ;
@@ -182,7 +182,7 @@ public void PropertiesOn_CInstanceTakeNamesFrom_B()
182182 {
183183 var client = this . ConfigureClient ( c=> c
184184 . MapPropertiesFor < B > ( props => props
185- . Add ( p=> p . X , "Xavier" )
185+ . Rename ( p=> p . X , "Xavier" )
186186 )
187187 ) ;
188188 Expression < Func < SomeClass , object > > exp = ( m ) => m . CInstance . X ;
@@ -194,7 +194,7 @@ public void PropertiesOn_BInstanceTakeNamesFrom_C()
194194 {
195195 var client = this . ConfigureClient ( c=> c
196196 . MapPropertiesFor < C > ( props => props
197- . Add ( p=> p . X , "Xavier" )
197+ . Rename ( p=> p . X , "Xavier" )
198198 )
199199 ) ;
200200 Expression < Func < SomeClass , object > > exp = ( m ) => m . BInstance . X ;
@@ -206,7 +206,7 @@ public void PropertiesOnCollectionExpressionsResolve()
206206 {
207207 var client = this . ConfigureClient ( c=> c
208208 . MapPropertiesFor < MyCustomClass > ( props => props
209- . Add ( p=> p . MyProperty , "myProp" )
209+ . Rename ( p=> p . MyProperty , "myProp" )
210210 )
211211 ) ;
212212 Expression < Func < SomeClass , object > > exp = ( m ) => m . ListOfCustomClasses . First ( ) . MyProperty ;
0 commit comments