@Test public void testDeregisterPayload() { DeregisterLoadBalancerRequestBinder binder = new DeregisterLoadBalancerRequestBinder(); String actual = binder.createPayload(LoadBalancer.Request.createDeregisteringPayload( "load-balancer-id", ImmutableList.of("1", "2"))); assertNotNull(actual, "Binder returned null payload"); assertEquals(actual, expectedPayload); }
@Override protected String createPayload(LoadBalancer.Request.DeregisterPayload payload) { requestBuilder.append("<ws:deregisterServersOnLoadBalancer>"); for (String s : payload.serverIds()) requestBuilder.append(format("<serverIds>%s</serverIds>", s)); requestBuilder.append(format("<loadBalancerId>%s</loadBalancerId>", payload.id())) .append("</ws:deregisterServersOnLoadBalancer>"); return requestBuilder.toString(); }
DeregisterLoadBalancerRequestBinder extends BaseProfitBricksRequestBinder<LoadBalancer.Request.DeregisterPayload> { @Override protected String createPayload(LoadBalancer.Request.DeregisterPayload payload) { requestBuilder.append("<ws:deregisterServersOnLoadBalancer>"); for (String s : payload.serverIds()) requestBuilder.append(format("<serverIds>%s</serverIds>", s)); requestBuilder.append(format("<loadBalancerId>%s</loadBalancerId>", payload.id())) .append("</ws:deregisterServersOnLoadBalancer>"); return requestBuilder.toString(); } }
DeregisterLoadBalancerRequestBinder extends BaseProfitBricksRequestBinder<LoadBalancer.Request.DeregisterPayload> { @Override protected String createPayload(LoadBalancer.Request.DeregisterPayload payload) { requestBuilder.append("<ws:deregisterServersOnLoadBalancer>"); for (String s : payload.serverIds()) requestBuilder.append(format("<serverIds>%s</serverIds>", s)); requestBuilder.append(format("<loadBalancerId>%s</loadBalancerId>", payload.id())) .append("</ws:deregisterServersOnLoadBalancer>"); return requestBuilder.toString(); } DeregisterLoadBalancerRequestBinder(); }
DeregisterLoadBalancerRequestBinder extends BaseProfitBricksRequestBinder<LoadBalancer.Request.DeregisterPayload> { @Override protected String createPayload(LoadBalancer.Request.DeregisterPayload payload) { requestBuilder.append("<ws:deregisterServersOnLoadBalancer>"); for (String s : payload.serverIds()) requestBuilder.append(format("<serverIds>%s</serverIds>", s)); requestBuilder.append(format("<loadBalancerId>%s</loadBalancerId>", payload.id())) .append("</ws:deregisterServersOnLoadBalancer>"); return requestBuilder.toString(); } DeregisterLoadBalancerRequestBinder();  }
DeregisterLoadBalancerRequestBinder extends BaseProfitBricksRequestBinder<LoadBalancer.Request.DeregisterPayload> { @Override protected String createPayload(LoadBalancer.Request.DeregisterPayload payload) { requestBuilder.append("<ws:deregisterServersOnLoadBalancer>"); for (String s : payload.serverIds()) requestBuilder.append(format("<serverIds>%s</serverIds>", s)); requestBuilder.append(format("<loadBalancerId>%s</loadBalancerId>", payload.id())) .append("</ws:deregisterServersOnLoadBalancer>"); return requestBuilder.toString(); } DeregisterLoadBalancerRequestBinder();   }