public async Task DeserializeTest() { // Arrange string json = "{\"id\":1,\"name\":\"Test\"}"; // Act Models.SampleObject actual = await JsonHelper.Deserialize <Models.SampleObject>(json); // Assert Assert.IsNotNull(actual); }
public async Task DeserializeResponseTest() { // Arrange HttpResponseMessage response = new HttpResponseMessage(); response.Content = new StringContent("{\"id\":1,\"name\":\"Test\"}", Encoding.UTF8, "application/json"); // Act Models.SampleObject actual = await JsonHelper.DeserializeResponse <Models.SampleObject>(response); // Assert Assert.IsNotNull(actual); }