@Test public void getPowerUsagePerOVFId() { SLAAgreementHelper helper = new SLAAgreementHelper(slaAgreement2Text); double powerUsage = helper.getPowerUsagePerOVFId("jboss"); assertEquals(10.0, powerUsage, 0.0001); powerUsage = helper.getPowerUsagePerOVFId("haproxy"); assertEquals(12.3, powerUsage, 0.0001); helper = new SLAAgreementHelper(slaAgreementText); powerUsage = helper.getPowerUsagePerOVFId("jboss"); assertEquals(0.0, powerUsage, 0.0001); }
public double getPowerUsagePerOVFId(String ovfId) { return getPowerUsage("Power_Usage_for_" + ovfId); }
SLAAgreementHelper { public double getPowerUsagePerOVFId(String ovfId) { return getPowerUsage("Power_Usage_for_" + ovfId); } }
SLAAgreementHelper { public double getPowerUsagePerOVFId(String ovfId) { return getPowerUsage("Power_Usage_for_" + ovfId); } SLAAgreementHelper(String slaString); }
SLAAgreementHelper { public double getPowerUsagePerOVFId(String ovfId) { return getPowerUsage("Power_Usage_for_" + ovfId); } SLAAgreementHelper(String slaString); SLA getSla(); double getPowerUsagePerApp(); String getPowerUsagePerAppUnits(); double getPowerUsagePerOVFId(String ovfId); String getPowerUnitsPerOVFId(String ovfId); }
SLAAgreementHelper { public double getPowerUsagePerOVFId(String ovfId) { return getPowerUsage("Power_Usage_for_" + ovfId); } SLAAgreementHelper(String slaString); SLA getSla(); double getPowerUsagePerApp(); String getPowerUsagePerAppUnits(); double getPowerUsagePerOVFId(String ovfId); String getPowerUnitsPerOVFId(String ovfId);  }