public XmlBodyDeserializerFixture() { deserialize = new XmlBodyDeserializer(); testModel = new TestModel { Bar = 13, Foo = "lil" }; testModelXml = ToXmlString(testModel); }
/// <summary> /// Gets the deserialized representation of the XML in the response body using the default XML body deserializer. /// </summary> /// <typeparam name="TModel">The type that the XML response body should be deserialized to.</typeparam> /// <param name="bodyWrapper">An instance of the <see cref="BrowserResponseBodyWrapper"/> that the extension should be invoked on.</param> /// <value>A <typeparamref name="TModel"/> instance representation of the HTTP response body.</value> public static TModel DeserializeXml<TModel>(this BrowserResponseBodyWrapper bodyWrapper) { var bodyDeserializer = new XmlBodyDeserializer(); return bodyWrapper.Deserialize<TModel>(bodyDeserializer); }