File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public void Can_Deserialize_Simple_Generic_List_of_Simple_Types()
7272 }
7373
7474 [ Fact ]
75- public void Can_Deserialize_Simple_Generic_List_given_Item_Without_Array ( )
75+ public void Can_Deserialize_Simple_Generic_List_Given_Item_Without_Array ( )
7676 {
7777 const string content = "{\" users\" :\" johnsheehan\" }" ;
7878 var json = new JsonDeserializer { RootElement = "users" } ;
@@ -82,6 +82,17 @@ public void Can_Deserialize_Simple_Generic_List_given_Item_Without_Array ()
8282 Assert . True ( output . SequenceEqual ( new [ ] { "johnsheehan" } ) ) ;
8383 }
8484
85+ [ Fact ]
86+ public void Can_Deserialize_Simple_Generic_List_Given_Toplevel_Item_Without_Array ( )
87+ {
88+ const string content = "\" johnsheehan\" " ;
89+ var json = new JsonDeserializer ( ) ;
90+
91+ var output = json . Deserialize < List < string > > ( new RestResponse { Content = content } ) ;
92+
93+ Assert . True ( output . SequenceEqual ( new [ ] { "johnsheehan" } ) ) ;
94+ }
95+
8596 [ Fact ]
8697 public void Can_Deserialize_From_Root_Element ( )
8798 {
You can’t perform that action at this time.
0 commit comments