@Test public void testCreatePayload() { UpdateDataCenterRequestBinder binder = new UpdateDataCenterRequestBinder(); DataCenter.Request.UpdatePayload payload = DataCenter.Request.updatingPayload("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "Apache-DC"); String actual = binder.createPayload(payload); assertNotNull(actual, "Binder returned null payload"); assertEquals(actual, expectedPayload); }
@Override protected String createPayload(DataCenter.Request.UpdatePayload payload) { requestBuilder.append("<ws:updateDataCenter>") .append("<request>") .append(format("<dataCenterId>%s</dataCenterId>", payload.id())) .append(format("<dataCenterName>%s</dataCenterName>", payload.name())) .append("</request>") .append("</ws:updateDataCenter>"); return requestBuilder.toString(); }
UpdateDataCenterRequestBinder extends BaseProfitBricksRequestBinder<DataCenter.Request.UpdatePayload> { @Override protected String createPayload(DataCenter.Request.UpdatePayload payload) { requestBuilder.append("<ws:updateDataCenter>") .append("<request>") .append(format("<dataCenterId>%s</dataCenterId>", payload.id())) .append(format("<dataCenterName>%s</dataCenterName>", payload.name())) .append("</request>") .append("</ws:updateDataCenter>"); return requestBuilder.toString(); } }
UpdateDataCenterRequestBinder extends BaseProfitBricksRequestBinder<DataCenter.Request.UpdatePayload> { @Override protected String createPayload(DataCenter.Request.UpdatePayload payload) { requestBuilder.append("<ws:updateDataCenter>") .append("<request>") .append(format("<dataCenterId>%s</dataCenterId>", payload.id())) .append(format("<dataCenterName>%s</dataCenterName>", payload.name())) .append("</request>") .append("</ws:updateDataCenter>"); return requestBuilder.toString(); } UpdateDataCenterRequestBinder(); }
UpdateDataCenterRequestBinder extends BaseProfitBricksRequestBinder<DataCenter.Request.UpdatePayload> { @Override protected String createPayload(DataCenter.Request.UpdatePayload payload) { requestBuilder.append("<ws:updateDataCenter>") .append("<request>") .append(format("<dataCenterId>%s</dataCenterId>", payload.id())) .append(format("<dataCenterName>%s</dataCenterName>", payload.name())) .append("</request>") .append("</ws:updateDataCenter>"); return requestBuilder.toString(); } UpdateDataCenterRequestBinder();  }
UpdateDataCenterRequestBinder extends BaseProfitBricksRequestBinder<DataCenter.Request.UpdatePayload> { @Override protected String createPayload(DataCenter.Request.UpdatePayload payload) { requestBuilder.append("<ws:updateDataCenter>") .append("<request>") .append(format("<dataCenterId>%s</dataCenterId>", payload.id())) .append(format("<dataCenterName>%s</dataCenterName>", payload.name())) .append("</request>") .append("</ws:updateDataCenter>"); return requestBuilder.toString(); } UpdateDataCenterRequestBinder();   }