@@ -240,6 +240,7 @@ public void Can_Deserialize_Independent_Side_Of_One_To_One_Relationship_With_Rel
240
240
jsonApiContextMock . SetupAllProperties ( ) ;
241
241
jsonApiContextMock . Setup ( m => m . ContextGraph ) . Returns ( contextGraph ) ;
242
242
jsonApiContextMock . Setup ( m => m . AttributesToUpdate ) . Returns ( new Dictionary < AttrAttribute , object > ( ) ) ;
243
+ jsonApiContextMock . Setup ( m => m . HasOneRelationshipPointers ) . Returns ( new HasOneRelationshipPointers ( ) ) ;
243
244
244
245
var jsonApiOptions = new JsonApiOptions ( ) ;
245
246
jsonApiContextMock . Setup ( m => m . Options ) . Returns ( jsonApiOptions ) ;
@@ -255,7 +256,14 @@ public void Can_Deserialize_Independent_Side_Of_One_To_One_Relationship_With_Rel
255
256
Id = "1" ,
256
257
Attributes = new Dictionary < string , object > { { "property" , property } } ,
257
258
// a common case for this is deserialization in unit tests
258
- Relationships = new Dictionary < string , RelationshipData > { { "dependent" , new RelationshipData { } } }
259
+ Relationships = new Dictionary < string , RelationshipData > {
260
+ {
261
+ "dependent" , new RelationshipData
262
+ {
263
+ SingleData = new ResourceIdentifierObject ( "dependents" , "1" )
264
+ }
265
+ }
266
+ }
259
267
}
260
268
} ;
261
269
@@ -267,6 +275,8 @@ public void Can_Deserialize_Independent_Side_Of_One_To_One_Relationship_With_Rel
267
275
// assert
268
276
Assert . NotNull ( result ) ;
269
277
Assert . Equal ( property , result . Property ) ;
278
+ Assert . NotNull ( result . Dependent ) ;
279
+ Assert . Equal ( 1 , result . Dependent . Id ) ;
270
280
}
271
281
272
282
[ Fact ]
0 commit comments