@@ -243,7 +243,7 @@ public void GetHashCode_TwoItems_HashCodeEqualToTwoItems() =>
243243 [ InlineData ( "" ) ]
244244 [ InlineData ( " " ) ]
245245 [ InlineData ( " " ) ]
246- public void ToString_EmptyOrWhiteSpace_BookOmitsNameProperty ( string name )
246+ public void ToString_NullEmptyOrWhiteSpace_BookOmitsNameProperty ( string name )
247247 {
248248 var book = new Book ( ) { Name = name } ;
249249 Assert . Equal ( "{\" @context\" :\" http://schema.org\" ,\" @type\" :\" Book\" }" , book . ToString ( ) ) ;
@@ -254,7 +254,7 @@ public void ToString_EmptyOrWhiteSpace_BookOmitsNameProperty(string name)
254254 [ InlineData ( "" ) ]
255255 [ InlineData ( " " ) ]
256256 [ InlineData ( " " ) ]
257- public void ToString_EmptyOrWhiteSpace_BookOmitsNamePropertyFromList ( string name )
257+ public void ToString_NullEmptyOrWhiteSpace_BookOmitsNamePropertyFromList ( string name )
258258 {
259259 var book = new Book ( ) { Name = new List < string > { "Hamlet" , name } } ;
260260 Assert . Equal ( "{\" @context\" :\" http://schema.org\" ,\" @type\" :\" Book\" ,\" name\" :\" Hamlet\" }" , book . ToString ( ) ) ;
@@ -265,22 +265,32 @@ public void ToString_EmptyOrWhiteSpace_BookOmitsNamePropertyFromList(string name
265265 [ InlineData ( "" ) ]
266266 [ InlineData ( " " ) ]
267267 [ InlineData ( " " ) ]
268- public void ToString_EmptyOrWhiteSpace_OrganizationOmitsAddressProperty ( string address )
268+ public void ToString_NullEmptyOrWhiteSpace_BookOmitsNamePropertyFromArray ( string name )
269269 {
270- var organization = new Organization ( ) { Address = address } ;
271- Assert . Equal ( "{\" @context\" :\" http://schema.org\" ,\" @type\" :\" Organization \" }" , organization . ToString ( ) ) ;
270+ var book = new Book ( ) { Name = new string [ ] { "Hamlet" , name } } ;
271+ Assert . Equal ( "{\" @context\" :\" http://schema.org\" ,\" @type\" :\" Book \" , \" name \" : \" Hamlet \" }" , book . ToString ( ) ) ;
272272 }
273273
274274 [ Theory ]
275275 [ InlineData ( null ) ]
276276 [ InlineData ( "" ) ]
277277 [ InlineData ( " " ) ]
278278 [ InlineData ( " " ) ]
279- public void ToString_EmptyOrWhiteSpace_OrganizationOmitsNamePropertyFromList ( string address )
279+ public void ToString_NullEmptyOrWhiteSpace_OrganizationOmitsNamePropertyFromList ( string address )
280280 {
281281 var organization = new Organization ( ) { Name = new List < string > { "Cardiff, UK" , address } } ;
282282 Assert . Equal ( "{\" @context\" :\" http://schema.org\" ,\" @type\" :\" Organization\" ,\" name\" :\" Cardiff, UK\" }" , organization . ToString ( ) ) ;
283283 }
284284
285+ [ Theory ]
286+ [ InlineData ( null ) ]
287+ [ InlineData ( "" ) ]
288+ [ InlineData ( " " ) ]
289+ [ InlineData ( " " ) ]
290+ public void ToString_NullEmptyOrWhiteSpace_OrganizationOmitsNamePropertyFromArray ( string address )
291+ {
292+ var organization = new Organization ( ) { Name = new string [ ] { "Cardiff, UK" , address } } ;
293+ Assert . Equal ( "{\" @context\" :\" http://schema.org\" ,\" @type\" :\" Organization\" ,\" name\" :\" Cardiff, UK\" }" , organization . ToString ( ) ) ;
294+ }
285295 }
286296}
0 commit comments