@@ -41,35 +41,35 @@ public void SetsDefaultOperations()
41
41
Assert . True ( pathItem . Operations . ContainsKey ( OperationType . Delete ) ) ;
42
42
}
43
43
44
- [ Fact ]
45
- public void SetsPutUpdateOperationWithUpdateMethodUpdateRestrictions ( )
44
+ [ Fact ]
45
+ public void SetsPutUpdateOperationWithUpdateMethodUpdateRestrictions ( )
46
46
{
47
- string annotation = $@ "
47
+ string annotation = $@ "
48
48
<Annotation Term=""Org.OData.Capabilities.V1.UpdateRestrictions"">
49
49
<Record>
50
50
<PropertyValue Property=""UpdateMethod"">
51
51
<EnumMember>Org.OData.Capabilities.V1.HttpMethod/PUT</EnumMember>
52
52
</PropertyValue>
53
53
</Record>
54
54
</Annotation>" ;
55
- string target = $@ """NS.Default/Customers /BillingAddress""";
55
+ string target = $@ """NS.Customer /BillingAddress""";
56
56
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
+ }
73
73
74
74
[ Fact ]
75
75
public void DoesntSetDeleteOnNonNullableProperties ( )
0 commit comments