Package org.jclouds.mezeo.pcs.binders

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

Related Classes of org.jclouds.mezeo.pcs.binders.BindContainerNameToXmlPayload

Copyright © 2018 www.massapicom. 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.