public void FormatRequest() { Model model = CreateModel(); WriteBodyAsFormsEncodedString(model); var formatter = new FormsFormatter(); var resource = formatter.FormatRequest(m_context, typeof(Model)) as Model; Assert.That(resource, Is.Not.Null); Assert.That(resource.Id, Is.EqualTo(model.Id)); Assert.That(resource.Name, Is.EqualTo(model.Name)); Assert.That(resource.Items, Is.Not.Null); CollectionAssert.AreEqual(model.Items, resource.Items); }