Examples of BindContainerNameToXmlPayload


Examples of org.jclouds.mezeo.pcs.binders.BindContainerNameToXmlPayload

*/
@Test(groups = "unit", testName = "pcs2.BindContainerNameToXmlPayloadTest")
public class BindContainerNameToXmlPayloadTest {

   public void test() {
      BindContainerNameToXmlPayload binder = new BindContainerNameToXmlPayload();
      HttpRequest request = new HttpRequest("GET", URI.create("http://localhost"));
      binder.bindToRequest(request, "foo");

      assertEquals(request.getPayload().getRawContent(), "<container><name>foo</name></container>");
      assertEquals(request.getPayload().getContentMetadata().getContentLength(), Long.valueOf(
               "<container><name>foo</name></container>".getBytes().length));
      assertEquals(request.getPayload().getContentMetadata().getContentType(), "application/unknown");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.