@@ -1357,25 +1357,25 @@ public void CreatePropertyNameExpression_ReturnsCorrectExpression()
1357
1357
1358
1358
// Act & Assert
1359
1359
// #1. Base property on base type
1360
- Expression property = binder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , baseProperty , source ) ;
1360
+ Expression property = SelectExpandBinder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , baseProperty , source ) ;
1361
1361
Assert . Equal ( ExpressionType . Constant , property . NodeType ) ;
1362
1362
Assert . Equal ( typeof ( string ) , property . Type ) ;
1363
1363
Assert . Equal ( "PrivateOrder" , ( property as ConstantExpression ) . Value ) ;
1364
1364
1365
1365
// #2. Base property on derived type
1366
- property = binder . CreatePropertyNameExpression ( _selectExpandBinderContext , vipCustomer , baseProperty , source ) ;
1366
+ property = SelectExpandBinder . CreatePropertyNameExpression ( _selectExpandBinderContext , vipCustomer , baseProperty , source ) ;
1367
1367
Assert . Equal ( ExpressionType . Constant , property . NodeType ) ;
1368
1368
Assert . Equal ( typeof ( string ) , property . Type ) ;
1369
1369
Assert . Equal ( "PrivateOrder" , ( property as ConstantExpression ) . Value ) ;
1370
1370
1371
1371
// #3. Derived property on base type
1372
- property = binder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , derivedProperty , source ) ;
1372
+ property = SelectExpandBinder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , derivedProperty , source ) ;
1373
1373
Assert . Equal ( ExpressionType . Conditional , property . NodeType ) ;
1374
1374
Assert . Equal ( typeof ( string ) , property . Type ) ;
1375
1375
Assert . Equal ( "IIF((aCustomer Is QueryVipCustomer), \" Birthday\" , null)" , property . ToString ( ) ) ;
1376
1376
1377
1377
// #4. Derived property on derived type.
1378
- property = binder . CreatePropertyNameExpression ( _selectExpandBinderContext , vipCustomer , derivedProperty , source ) ;
1378
+ property = SelectExpandBinder . CreatePropertyNameExpression ( _selectExpandBinderContext , vipCustomer , derivedProperty , source ) ;
1379
1379
Assert . Equal ( ExpressionType . Constant , property . NodeType ) ;
1380
1380
Assert . Equal ( typeof ( string ) , property . Type ) ;
1381
1381
Assert . Equal ( "Birthday" , ( property as ConstantExpression ) . Value ) ;
@@ -1394,7 +1394,7 @@ public void CreatePropertyNameExpression_ReturnsConstantExpression_IfPropertyTyp
1394
1394
Expression source = Expression . Parameter ( typeof ( QueryCustomer ) , "aCustomer" ) ;
1395
1395
1396
1396
// Act
1397
- Expression property = _binder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , edmProperty , source ) ;
1397
+ Expression property = SelectExpandBinder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , edmProperty , source ) ;
1398
1398
1399
1399
// Assert
1400
1400
Assert . Equal ( ExpressionType . Constant , property . NodeType ) ;
@@ -1417,7 +1417,7 @@ public void CreatePropertyNameExpression_ThrowsODataException_IfMappingTypeIsNot
1417
1417
SelectExpandBinder binder = GetBinder < QueryCustomer > ( model ) ;
1418
1418
1419
1419
// Act & Assert
1420
- ExceptionAssert . Throws < ODataException > ( ( ) => binder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , subNameProperty , source ) ,
1420
+ ExceptionAssert . Throws < ODataException > ( ( ) => SelectExpandBinder . CreatePropertyNameExpression ( _selectExpandBinderContext , _customer , subNameProperty , source ) ,
1421
1421
"The provided mapping does not contain a resource for the resource type 'NS.SubCustomer'." ) ;
1422
1422
}
1423
1423
#endregion
@@ -1435,7 +1435,7 @@ public void CreatePropertyValueExpression_NonDerivedNavigationProperty_ReturnsMe
1435
1435
Assert . NotNull ( navProperty ) ;
1436
1436
1437
1437
// Act
1438
- Expression propertyValue = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , navProperty , source , null ) ;
1438
+ Expression propertyValue = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , navProperty , source , null ) ;
1439
1439
1440
1440
// Assert
1441
1441
Assert . Equal ( ExpressionType . MemberAccess , propertyValue . NodeType ) ;
@@ -1458,7 +1458,7 @@ public void CreatePropertyValueExpression_DerivedNavigationProperty_ReturnsPrope
1458
1458
Assert . NotNull ( specialProperty ) ;
1459
1459
1460
1460
// Act
1461
- Expression propertyValue = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , specialProperty , source , null ) ;
1461
+ Expression propertyValue = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , specialProperty , source , null ) ;
1462
1462
1463
1463
// Assert
1464
1464
Assert . Equal ( String . Format ( "({0} As QueryVipCustomer).{1}" , source . ToString ( ) , property ) , propertyValue . ToString ( ) ) ;
@@ -1480,7 +1480,7 @@ public void CreatePropertyValueExpression_DerivedValueProperty_ReturnsPropertyAc
1480
1480
Assert . NotNull ( vipCustomer ) ;
1481
1481
1482
1482
// Act
1483
- Expression propertyValue = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , edmProperty , source , null ) ;
1483
+ Expression propertyValue = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , edmProperty , source , null ) ;
1484
1484
1485
1485
// Assert
1486
1486
Assert . Equal ( String . Format ( "Convert(({0} As QueryVipCustomer).{1}, Nullable`1)" , source . ToString ( ) , property ) , propertyValue . ToString ( ) ) ;
@@ -1502,7 +1502,7 @@ public void CreatePropertyValueExpression_DerivedReferenceProperty_ReturnsProper
1502
1502
Assert . NotNull ( vipCustomer ) ;
1503
1503
1504
1504
// Act
1505
- Expression propertyValue = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , edmProperty , source , null ) ;
1505
+ Expression propertyValue = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , edmProperty , source , null ) ;
1506
1506
1507
1507
// Assert
1508
1508
Assert . Equal ( String . Format ( "({0} As QueryVipCustomer).{1}" , source . ToString ( ) , property ) , propertyValue . ToString ( ) ) ;
@@ -1517,7 +1517,7 @@ public void CreatePropertyValueExpression_HandleNullPropagationTrue_AddsNullChec
1517
1517
IEdmProperty idProperty = _customer . StructuralProperties ( ) . Single ( p => p . Name == "Id" ) ;
1518
1518
1519
1519
// Act
1520
- Expression property = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , idProperty , source , null ) ;
1520
+ Expression property = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , idProperty , source , null ) ;
1521
1521
1522
1522
// Assert
1523
1523
// NetFx and NetCore differ in the way Expression is converted to a string.
@@ -1554,7 +1554,7 @@ public void CreatePropertyValueExpression_HandleNullPropagationFalse_ConvertsToN
1554
1554
IEdmProperty idProperty = _customer . StructuralProperties ( ) . Single ( p => p . Name == "Id" ) ;
1555
1555
1556
1556
// Act
1557
- Expression property = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , idProperty , source , filterClause : null ) ;
1557
+ Expression property = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , idProperty , source , filterClause : null ) ;
1558
1558
1559
1559
// Assert
1560
1560
Assert . Equal ( String . Format ( "Convert({0}.Id, Nullable`1)" , source . ToString ( ) ) , property . ToString ( ) ) ;
@@ -1587,7 +1587,7 @@ public void CreatePropertyValueExpression_Collection_ThrowsODataException_IfMapp
1587
1587
1588
1588
// Act & Assert
1589
1589
ExceptionAssert . Throws < ODataException > (
1590
- ( ) => _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , ordersProperty , source , expandItem . FilterOption ) ,
1590
+ ( ) => SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , ordersProperty , source , expandItem . FilterOption ) ,
1591
1591
String . Format ( "The provided mapping does not contain a resource for the resource type '{0}'." ,
1592
1592
ordersProperty . Type . Definition . AsElementType ( ) . FullTypeName ( ) ) ) ;
1593
1593
}
@@ -1616,7 +1616,7 @@ public void CreatePropertyValueExpression_Collection_Works_HandleNullPropagation
1616
1616
Assert . NotNull ( expandItem . FilterOption ) ;
1617
1617
1618
1618
// Act
1619
- var filterInExpand = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , ordersProperty , source , expandItem . FilterOption ) ;
1619
+ var filterInExpand = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _customer , ordersProperty , source , expandItem . FilterOption ) ;
1620
1620
1621
1621
// Assert
1622
1622
if ( nullOption == HandleNullPropagationOption . True )
@@ -1691,7 +1691,7 @@ public void CreatePropertyValueExpression_Single_Works_IfSettingIsOff()
1691
1691
Assert . NotNull ( expandItem . FilterOption ) ;
1692
1692
1693
1693
// Act
1694
- var filterInExpand = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _order , customerProperty , order , expandItem . FilterOption ) ;
1694
+ var filterInExpand = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _order , customerProperty , order , expandItem . FilterOption ) ;
1695
1695
1696
1696
// Assert
1697
1697
var customer = Expression . Lambda ( filterInExpand ) . Compile ( ) . DynamicInvoke ( ) as QueryCustomer ;
@@ -1725,7 +1725,7 @@ public void CreatePropertyValueExpression_Single_Works_HandleNullPropagationOpti
1725
1725
Assert . NotNull ( expandItem . FilterOption ) ;
1726
1726
1727
1727
// Act
1728
- var filterInExpand = _binder . CreatePropertyValueExpression ( _selectExpandBinderContext , _order , customerProperty , source , expandItem . FilterOption ) ;
1728
+ var filterInExpand = SelectExpandBinder . CreatePropertyValueExpression ( _selectExpandBinderContext , _order , customerProperty , source , expandItem . FilterOption ) ;
1729
1729
1730
1730
// Assert
1731
1731
if ( nullOption == HandleNullPropagationOption . True )
0 commit comments