@@ -41,35 +41,35 @@ public void SetsDefaultOperations()
4141 Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Delete ) ) ;
4242 }
4343
44- [ Fact ]
45- public void SetsPutUpdateOperationWithUpdateMethodUpdateRestrictions ( )
44+ [ Fact ]
45+ public void SetsPutUpdateOperationWithUpdateMethodUpdateRestrictions ( )
4646 {
47- string annotation = $@ "
47+ string annotation = $@ "
4848<Annotation Term=""Org.OData.Capabilities.V1.UpdateRestrictions"">
4949 <Record>
5050 <PropertyValue Property=""UpdateMethod"">
5151 <EnumMember>Org.OData.Capabilities.V1.HttpMethod/PUT</EnumMember>
5252 </PropertyValue>
5353 </Record>
5454</Annotation>" ;
55- string target = $@ """NS.Default/Customers /BillingAddress""";
55+ string target = $@ """NS.Customer /BillingAddress""";
5656
57- var model = EntitySetPathItemHandlerTests . GetEdmModel ( annotation : annotation ) ;
58- var context = new ODataContext ( model ) ;
59- var entitySet = model . EntityContainer . FindEntitySet ( "Customers" ) ;
60- Assert . NotNull ( entitySet ) ; // guard
61- var entityType = entitySet . EntityType ( ) ;
62- var property = entityType . FindProperty ( "BillingAddress" ) ;
63- Assert . NotNull ( property ) ; // guard
64- var path = new ODataPath ( new ODataNavigationSourceSegment ( entitySet ) , new ODataKeySegment ( entityType ) , new ODataComplexPropertySegment ( property as IEdmStructuralProperty ) ) ;
65- Assert . Equal ( ODataPathKind . ComplexProperty , path . Kind ) ; // guard
66- var pathItem = _pathItemHandler . CreatePathItem ( context , path ) ;
67- Assert . NotNull ( pathItem ) ;
68- Assert . Equal ( 3 , pathItem . Operations . Count ) ;
69- Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Get ) ) ;
70- Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Patch ) ) ;
71- Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Delete ) ) ;
72- }
57+ var model = EntitySetPathItemHandlerTests . GetEdmModel ( annotation : annotation , target : target ) ;
58+ var context = new ODataContext ( model ) ;
59+ var entitySet = model . EntityContainer . FindEntitySet ( "Customers" ) ;
60+ Assert . NotNull ( entitySet ) ; // guard
61+ var entityType = entitySet . EntityType ( ) ;
62+ var property = entityType . FindProperty ( "BillingAddress" ) ;
63+ Assert . NotNull ( property ) ; // guard
64+ var path = new ODataPath ( new ODataNavigationSourceSegment ( entitySet ) , new ODataKeySegment ( entityType ) , new ODataComplexPropertySegment ( property as IEdmStructuralProperty ) ) ;
65+ Assert . Equal ( ODataPathKind . ComplexProperty , path . Kind ) ; // guard
66+ var pathItem = _pathItemHandler . CreatePathItem ( context , path ) ;
67+ Assert . NotNull ( pathItem ) ;
68+ Assert . Equal ( 3 , pathItem . Operations . Count ) ;
69+ Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Get ) ) ;
70+ Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Put ) ) ;
71+ Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Delete ) ) ;
72+ }
7373
7474 [ Fact ]
7575 public void DoesntSetDeleteOnNonNullableProperties ( )
0 commit comments