@@ -56,7 +56,12 @@ public Point(int x, int y)
56
56
struct Rect
57
57
{
58
58
public Point UpperLeft ;
59
- public Point BottonRight ;
59
+ public Point BottomRight ;
60
+ public Rect ( Point upperLeft , Point bottomRight )
61
+ {
62
+ UpperLeft = upperLeft ;
63
+ BottomRight = bottomRight ;
64
+ }
60
65
}
61
66
62
67
[ Test ]
@@ -83,7 +88,7 @@ public void TestNullToValueTypes()
83
88
84
89
Assert . AreEqual ( default ( Rect ) , Decode < Rect > ( NullV . Instance ) ) ;
85
90
Assert . AreEqual ( default ( Rect ) , Decode < Rect > ( ObjectV . Empty ) ) ;
86
- Assert . AreEqual ( default ( Rect ) , Decode < Rect > ( ObjectV . With ( "UpperLeft" , NullV . Instance , "BottonRight " , NullV . Instance ) ) ) ;
91
+ Assert . AreEqual ( default ( Rect ) , Decode < Rect > ( ObjectV . With ( "UpperLeft" , NullV . Instance , "BottomRight " , NullV . Instance ) ) ) ;
87
92
88
93
//
89
94
@@ -379,7 +384,7 @@ class MissingPropertiesOnConstructor
379
384
public string Field1 { get ; set ; }
380
385
381
386
[ FaunaField ( "a_missing_field" ) ]
382
- string field2 ;
387
+ string field2 = default ( string ) ;
383
388
384
389
public string Field2 { get { return field2 ; } }
385
390
@@ -409,7 +414,7 @@ class MissingPropertiesOnMethodCreator
409
414
public string Field1 { get ; set ; }
410
415
411
416
[ FaunaField ( "a_missing_field" ) ]
412
- string field2 ;
417
+ string field2 = default ( string ) ;
413
418
414
419
public string Field2 { get { return field2 ; } }
415
420
@@ -711,13 +716,24 @@ struct NestedStruct
711
716
{
712
717
public byte ? aByte ;
713
718
public short ? aShort ;
719
+ public NestedStruct ( byte ? abyte , short ? ashort )
720
+ {
721
+ aByte = abyte ;
722
+ aShort = ashort ;
723
+ }
714
724
}
715
725
716
726
struct StructWithNullableFields
717
727
{
718
728
public int ? anInteger ;
719
729
public double ? aDouble ;
720
730
public NestedStruct ? aStruct ;
731
+ public StructWithNullableFields ( int ? intVal , double ? doubleVal , NestedStruct ? structVal )
732
+ {
733
+ anInteger = intVal ;
734
+ aDouble = doubleVal ;
735
+ aStruct = structVal ;
736
+ }
721
737
}
722
738
723
739
[ Test ]
0 commit comments