@@ -60,7 +60,7 @@ public DocumentBuilder_Tests()
60
60
[ Fact ]
61
61
public void Includes_Paging_Links_By_Default ( )
62
62
{
63
- // arrange
63
+ // arrange
64
64
_pageManager . PageSize = 1 ;
65
65
_pageManager . TotalRecords = 1 ;
66
66
_pageManager . CurrentPage = 1 ;
@@ -126,7 +126,8 @@ public void Related_Links_Can_Be_Disabled()
126
126
public void Related_Data_Included_In_Relationships_By_Default ( )
127
127
{
128
128
// arrange
129
- const string relationshipName = "related-models" ;
129
+ const string relatedTypeName = "related-models" ;
130
+ const string relationshipName = "related-model" ;
130
131
const int relatedId = 1 ;
131
132
_jsonApiContextMock
132
133
. Setup ( m => m . ContextGraph )
@@ -148,9 +149,9 @@ public void Related_Data_Included_In_Relationships_By_Default()
148
149
var relationshipData = document . Data . Relationships [ relationshipName ] ;
149
150
Assert . NotNull ( relationshipData ) ;
150
151
Assert . NotNull ( relationshipData . SingleData ) ;
151
- Assert . NotNull ( relationshipData . SingleData ) ;
152
- Assert . Equal ( relatedId . ToString ( ) , relationshipData . SingleData . Id ) ;
153
- Assert . Equal ( relationshipName , relationshipData . SingleData . Type ) ;
152
+ Assert . NotNull ( relationshipData . SingleData ) ;
153
+ Assert . Equal ( relatedId . ToString ( ) , relationshipData . SingleData . Id ) ;
154
+ Assert . Equal ( relatedTypeName , relationshipData . SingleData . Type ) ;
154
155
}
155
156
156
157
[ Fact ]
@@ -177,12 +178,12 @@ public void Build_Can_Build_CustomIEnumerables()
177
178
178
179
179
180
[ Theory ]
180
- [ InlineData ( null , null , true ) ]
181
- [ InlineData ( false , null , true ) ]
182
- [ InlineData ( true , null , false ) ]
183
- [ InlineData ( null , "foo" , true ) ]
184
- [ InlineData ( false , "foo" , true ) ]
185
- [ InlineData ( true , "foo" , true ) ]
181
+ [ InlineData ( null , null , true ) ]
182
+ [ InlineData ( false , null , true ) ]
183
+ [ InlineData ( true , null , false ) ]
184
+ [ InlineData ( null , "foo" , true ) ]
185
+ [ InlineData ( false , "foo" , true ) ]
186
+ [ InlineData ( true , "foo" , true ) ]
186
187
public void DocumentBuilderOptions ( bool ? omitNullValuedAttributes ,
187
188
string attributeValue ,
188
189
bool resultContainsAttribute )
@@ -194,7 +195,7 @@ public void DocumentBuilderOptions(bool? omitNullValuedAttributes,
194
195
. Returns ( new DocumentBuilderOptions ( omitNullValuedAttributes . Value ) ) ;
195
196
}
196
197
var documentBuilder = new DocumentBuilder ( _jsonApiContextMock . Object , null , omitNullValuedAttributes . HasValue ? documentBuilderBehaviourMock . Object : null ) ;
197
- var document = documentBuilder . Build ( new Model ( ) { StringProperty = attributeValue } ) ;
198
+ var document = documentBuilder . Build ( new Model ( ) { StringProperty = attributeValue } ) ;
198
199
199
200
Assert . Equal ( resultContainsAttribute , document . Data . Attributes . ContainsKey ( "StringProperty" ) ) ;
200
201
}
0 commit comments