Author: adietish
Date: 2010-10-29 05:35:07 -0400 (Fri, 29 Oct 2010)
New Revision: 26122
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ProfileMockIntegrationTest.java
Log:
[JBIDE-7437] fixed HardwareProfile unmarshalling
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-29
08:35:19 UTC (rev 26121)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-29
09:35:07 UTC (rev 26122)
@@ -288,7 +288,7 @@
@Override
public HardwareProfile listProfile(String profileId) throws DeltaCloudClientException {
String request = DCNS.HARDWARE_PROFILES + "/" + profileId;
- return JAXB.unmarshal(new StringReader(sendRequest(request, RequestType.GET)),
HardwareProfile.class);
+ return buildDeltaCloudObject(HardwareProfile.class, sendRequest(request,
RequestType.GET));
}
@Override
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ProfileMockIntegrationTest.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ProfileMockIntegrationTest.java 2010-10-29
08:35:19 UTC (rev 26121)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ProfileMockIntegrationTest.java 2010-10-29
09:35:07 UTC (rev 26122)
@@ -58,12 +58,13 @@
// get a profile seen in the web UI
HardwareProfile profile = testSetup.getClient().listProfile("m1-small");
assertNotNull(profile);
- assertHardWareProfile("i386", "1740.8", "160", profile);
+ assertHardWareProfile("i386", "1740.8 MB", "160 GB",
"1", profile);
}
- public void assertHardWareProfile(String architecture, String memory, String storage,
HardwareProfile profile) {
+ public void assertHardWareProfile(String architecture, String memory, String storage,
String cpu, HardwareProfile profile) {
assertEquals(architecture, profile.getArchitecture());
assertEquals(memory, profile.getMemory());
assertEquals(storage, profile.getStorage());
+ assertEquals(cpu, profile.getCPU());
}
}
Show replies by date