Skip to content

Commit 9ca39e2

Browse files
committed
add helper
1 parent 586ff49 commit 9ca39e2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

RestSharp.Tests/JsonTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,5 +798,13 @@ public string CreateDynamicJsonStringDictionary ()
798798
doc["ThingBlue"] = new JObject (new JProperty("Name", "ThingBlue"), new JProperty ("Color", "Blue"));
799799
return doc.ToString ();
800800
}
801+
802+
private T GetPayLoad<T>(string fileName)
803+
{
804+
var doc = File.ReadAllText(Path.Combine("SampleData", fileName));
805+
var response = new RestResponse { Content = doc };
806+
var d = new JsonDeserializer();
807+
return d.Deserialize<T>(response);
808+
}
801809
}
802810
}

0 commit comments

Comments
 (0)