@@ -245,13 +245,23 @@ public void Can_Deserialize_Various_Enum_Values ()
245245 var json = new JsonDeserializer ( ) ;
246246 var output = json . Deserialize < JsonEnumsTestStructure > ( response ) ;
247247
248- Assert . Equal ( output . Upper , Disposition . Friendly ) ;
249- Assert . Equal ( output . Lower , Disposition . Friendly ) ;
250- Assert . Equal ( output . CamelCased , Disposition . SoSo ) ;
251- Assert . Equal ( output . Underscores , Disposition . SoSo ) ;
252- Assert . Equal ( output . LowerUnderscores , Disposition . SoSo ) ;
253- Assert . Equal ( output . Dashes , Disposition . SoSo ) ;
254- Assert . Equal ( output . LowerDashes , Disposition . SoSo ) ;
248+ Assert . Equal ( Disposition . Friendly , output . Upper ) ;
249+ Assert . Equal ( Disposition . Friendly , output . Lower ) ;
250+ Assert . Equal ( Disposition . SoSo , output . CamelCased ) ;
251+ Assert . Equal ( Disposition . SoSo , output . Underscores ) ;
252+ Assert . Equal ( Disposition . SoSo , output . LowerUnderscores ) ;
253+ Assert . Equal ( Disposition . SoSo , output . Dashes ) ;
254+ Assert . Equal ( Disposition . SoSo , output . LowerDashes ) ;
255+ Assert . Equal ( Disposition . SoSo , output . Integer ) ;
256+ }
257+
258+ [ Fact ]
259+ public void Deserialization_Of_Undefined_Int_Value_Still_Throws_InvalidOperationException ( )
260+ {
261+ const string data = @"{ ""Integer"" : 1024 }" ;
262+ var response = new RestResponse { Content = data } ;
263+ var json = new JsonDeserializer ( ) ;
264+ Assert . Throws < InvalidOperationException > ( ( ) => json . Deserialize < JsonEnumsTestStructure > ( response ) ) ;
255265 }
256266
257267 [ Fact ]
0 commit comments