@@ -31,7 +31,7 @@ public void FieldRoundtrip_Works()
3131 Type = FolderType . Folder ,
3232 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
3333 } ,
34- Previous = new ( ) { FolderPath = "folderPath" } ,
34+ Previous = new ( "folderPath" ) ,
3535 } ;
3636
3737 string expectedID = "id" ;
@@ -51,7 +51,7 @@ public void FieldRoundtrip_Works()
5151 Type = FolderType . Folder ,
5252 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
5353 } ;
54- Previous expectedPrevious = new ( ) { FolderPath = "folderPath" } ;
54+ Previous expectedPrevious = new ( "folderPath" ) ;
5555
5656 Assert . Equal ( expectedID , model . ID ) ;
5757 Assert . Equal ( expectedType , model . Type ) ;
@@ -82,7 +82,7 @@ public void SerializationRoundtrip_Works()
8282 Type = FolderType . Folder ,
8383 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
8484 } ,
85- Previous = new ( ) { FolderPath = "folderPath" } ,
85+ Previous = new ( "folderPath" ) ,
8686 } ;
8787
8888 string json = JsonSerializer . Serialize ( model , ModelBase . SerializerOptions ) ;
@@ -116,7 +116,7 @@ public void FieldRoundtripThroughSerialization_Works()
116116 Type = FolderType . Folder ,
117117 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
118118 } ,
119- Previous = new ( ) { FolderPath = "folderPath" } ,
119+ Previous = new ( "folderPath" ) ,
120120 } ;
121121
122122 string element = JsonSerializer . Serialize ( model , ModelBase . SerializerOptions ) ;
@@ -143,7 +143,7 @@ public void FieldRoundtripThroughSerialization_Works()
143143 Type = FolderType . Folder ,
144144 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
145145 } ;
146- Previous expectedPrevious = new ( ) { FolderPath = "folderPath" } ;
146+ Previous expectedPrevious = new ( "folderPath" ) ;
147147
148148 Assert . Equal ( expectedID , deserialized . ID ) ;
149149 Assert . Equal ( expectedType , deserialized . Type ) ;
@@ -174,7 +174,7 @@ public void Validation_Works()
174174 Type = FolderType . Folder ,
175175 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
176176 } ,
177- Previous = new ( ) { FolderPath = "folderPath" } ,
177+ Previous = new ( "folderPath" ) ,
178178 } ;
179179
180180 model . Validate ( ) ;
@@ -318,7 +318,7 @@ public void CopyConstructor_Works()
318318 Type = FolderType . Folder ,
319319 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
320320 } ,
321- Previous = new ( ) { FolderPath = "folderPath" } ,
321+ Previous = new ( "folderPath" ) ,
322322 } ;
323323
324324 FolderUpdateEvent copied = new ( model ) ;
@@ -349,7 +349,7 @@ public void FieldRoundtrip_Works()
349349 Type = FolderType . Folder ,
350350 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
351351 } ,
352- Previous = new ( ) { FolderPath = "folderPath" } ,
352+ Previous = new ( "folderPath" ) ,
353353 } ;
354354
355355 DateTimeOffset expectedCreatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ;
@@ -368,7 +368,7 @@ public void FieldRoundtrip_Works()
368368 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
369369 } ;
370370 JsonElement expectedType = JsonSerializer . SerializeToElement ( "folder.updated" ) ;
371- Previous expectedPrevious = new ( ) { FolderPath = "folderPath" } ;
371+ Previous expectedPrevious = new ( "folderPath" ) ;
372372
373373 Assert . Equal ( expectedCreatedAt , model . CreatedAt ) ;
374374 Assert . Equal ( expectedData , model . Data ) ;
@@ -396,7 +396,7 @@ public void SerializationRoundtrip_Works()
396396 Type = FolderType . Folder ,
397397 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
398398 } ,
399- Previous = new ( ) { FolderPath = "folderPath" } ,
399+ Previous = new ( "folderPath" ) ,
400400 } ;
401401
402402 string json = JsonSerializer . Serialize ( model , ModelBase . SerializerOptions ) ;
@@ -428,7 +428,7 @@ public void FieldRoundtripThroughSerialization_Works()
428428 Type = FolderType . Folder ,
429429 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
430430 } ,
431- Previous = new ( ) { FolderPath = "folderPath" } ,
431+ Previous = new ( "folderPath" ) ,
432432 } ;
433433
434434 string element = JsonSerializer . Serialize ( model , ModelBase . SerializerOptions ) ;
@@ -454,7 +454,7 @@ public void FieldRoundtripThroughSerialization_Works()
454454 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
455455 } ;
456456 JsonElement expectedType = JsonSerializer . SerializeToElement ( "folder.updated" ) ;
457- Previous expectedPrevious = new ( ) { FolderPath = "folderPath" } ;
457+ Previous expectedPrevious = new ( "folderPath" ) ;
458458
459459 Assert . Equal ( expectedCreatedAt , deserialized . CreatedAt ) ;
460460 Assert . Equal ( expectedData , deserialized . Data ) ;
@@ -482,7 +482,7 @@ public void Validation_Works()
482482 Type = FolderType . Folder ,
483483 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
484484 } ,
485- Previous = new ( ) { FolderPath = "folderPath" } ,
485+ Previous = new ( "folderPath" ) ,
486486 } ;
487487
488488 model . Validate ( ) ;
@@ -616,7 +616,7 @@ public void CopyConstructor_Works()
616616 Type = FolderType . Folder ,
617617 UpdatedAt = DateTimeOffset . Parse ( "2019-12-27T18:11:19.117Z" ) ,
618618 } ,
619- Previous = new ( ) { FolderPath = "folderPath" } ,
619+ Previous = new ( "folderPath" ) ,
620620 } ;
621621
622622 FolderUpdateEventFolderUpdateEvent copied = new ( model ) ;
@@ -673,48 +673,6 @@ public void Validation_Works()
673673 model . Validate ( ) ;
674674 }
675675
676- [ Fact ]
677- public void OptionalNonNullablePropertiesUnsetAreNotSet_Works ( )
678- {
679- var model = new Previous { } ;
680-
681- Assert . Null ( model . FolderPath ) ;
682- Assert . False ( model . RawData . ContainsKey ( "folderPath" ) ) ;
683- }
684-
685- [ Fact ]
686- public void OptionalNonNullablePropertiesUnsetValidation_Works ( )
687- {
688- var model = new Previous { } ;
689-
690- model . Validate ( ) ;
691- }
692-
693- [ Fact ]
694- public void OptionalNonNullablePropertiesSetToNullAreNotSet_Works ( )
695- {
696- var model = new Previous
697- {
698- // Null should be interpreted as omitted for these properties
699- FolderPath = null ,
700- } ;
701-
702- Assert . Null ( model . FolderPath ) ;
703- Assert . False ( model . RawData . ContainsKey ( "folderPath" ) ) ;
704- }
705-
706- [ Fact ]
707- public void OptionalNonNullablePropertiesSetToNullValidation_Works ( )
708- {
709- var model = new Previous
710- {
711- // Null should be interpreted as omitted for these properties
712- FolderPath = null ,
713- } ;
714-
715- model . Validate ( ) ;
716- }
717-
718676 [ Fact ]
719677 public void CopyConstructor_Works ( )
720678 {
0 commit comments