@@ -49,6 +49,12 @@ public void Can_Deserialize_4sq_Json_With_Root_Element_Specified()
49
49
public void Can_Deserialize_Lists_of_Simple_Types ( )
50
50
{
51
51
var doc = File . ReadAllText ( Path . Combine ( "SampleData" , "jsonlists.txt" ) ) ;
52
+ var json = new JsonDeserializer ( ) ;
53
+
54
+ var output = json . Deserialize < JsonLists > ( new RestResponse { Content = doc } ) ;
55
+
56
+ Assert . NotEmpty ( output . Names ) ;
57
+ Assert . NotEmpty ( output . Numbers ) ;
52
58
}
53
59
54
60
[ Fact ]
@@ -149,6 +155,23 @@ public void Can_Deserialize_Root_Json_Array_To_List()
149
155
Assert . Equal ( 4 , output . Count ) ;
150
156
}
151
157
158
+ [ Fact ]
159
+ public void Can_Deserialize_Various_Enum_Values ( )
160
+ {
161
+ var data = File . ReadAllText ( Path . Combine ( "SampleData" , "jsonenums.txt" ) ) ;
162
+ var response = new RestResponse { Content = data } ;
163
+ var json = new JsonDeserializer ( ) ;
164
+ var output = json . Deserialize < JsonEnumsTestStructure > ( response ) ;
165
+
166
+ Assert . Equal ( output . Upper , Disposition . Friendly ) ;
167
+ Assert . Equal ( output . Lower , Disposition . Friendly ) ;
168
+ Assert . Equal ( output . CamelCased , Disposition . SoSo ) ;
169
+ Assert . Equal ( output . Underscores , Disposition . SoSo ) ;
170
+ Assert . Equal ( output . LowerUnderscores , Disposition . SoSo ) ;
171
+ Assert . Equal ( output . Dashes , Disposition . SoSo ) ;
172
+ Assert . Equal ( output . LowerDashes , Disposition . SoSo ) ;
173
+ }
174
+
152
175
[ Fact ]
153
176
public void Can_Deserialize_Guid_String_Fields ( )
154
177
{
0 commit comments