public void ShouldCreateContentBasedOnSuppliedForm() { var dataStrategy = new PrepopulatedFormDataStrategy(DummyResponse.EntityBody, ExampleMediaType.ContentType); var content = dataStrategy.CreateFormData(null, null, ClientCapabilities); Assert.AreEqual(DummyResponse.EntityBody.Id, content.ReadAsObject<ExampleEntityBody>(ExampleMediaType.Instance).Id); }
public void ShouldAddContentTypeHeaderToContent() { var dataStrategy = new PrepopulatedFormDataStrategy(DummyResponse.EntityBody, ExampleMediaType.ContentType); var content = dataStrategy.CreateFormData(null, null, ClientCapabilities); Assert.AreEqual(ExampleMediaType.ContentType, content.Headers.ContentType); }