public void CanPostUnregisteredType() { UnregisteredClass data = new UnregisteredClass { Text = "Hello" }; Request request = Session.Bind(XmlEchoTemplate); Response <UnregisteredClass> response = request.Accept("application/xml").ContentType("application/xml").Post <UnregisteredClass>(data); Assert.AreEqual(data.Text, response.Body.Text); }
public void CanPostUnregisteredTypeWithShorthand() { UnregisteredClass data = new UnregisteredClass { Text = "Hello" }; Request request = Session.Bind(XmlEchoTemplate); Response <UnregisteredClass> response = request.AsXml().AcceptXml().Post <UnregisteredClass>(data); Assert.AreEqual(data.Text, response.Body.Text); }
public void CanPostUnregisteredTypeUsingShorthand() { UnregisteredClass data = new UnregisteredClass { Text = "Hello" }; Request request = Session.Bind(AnyEchoTemplate); using (Response <UnregisteredClass> response = request.AsJson().AcceptJson().Post <UnregisteredClass>(data)) { Assert.AreEqual(data.Text, response.Body.Text); } }
public UnregisteredParentClass(UnregisteredClass childClass) { ChildClass = childClass; }