Search in sources :

Example 6 with Outlet

use of com.vmware.flowgate.poweriqworker.model.Outlet in project flowgate by vmware.

the class SyncRealTimeDataJobTest method testGetValueUnits.

@Test
public void testGetValueUnits() {
    Mockito.when(this.powerIQAPIClient.getPduByID(anyLong())).thenReturn(new Pdu());
    Mockito.when(this.powerIQAPIClient.getOutlets(anyLong())).thenReturn(new ArrayList<Outlet>());
    Map<String, String> pduInfoMap = new HashMap<String, String>();
    pduInfoMap.put(FlowgateConstant.PDU_ID_FROM_POWERIQ, "123");
    List<ValueUnit> valueUnits = powerIQService.getValueUnits(pduInfoMap, powerIQAPIClient, null);
    TestCase.assertEquals(true, valueUnits.isEmpty());
}
Also used : Pdu(com.vmware.flowgate.poweriqworker.model.Pdu) HashMap(java.util.HashMap) Outlet(com.vmware.flowgate.poweriqworker.model.Outlet) ValueUnit(com.vmware.flowgate.common.model.ValueUnit) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

Outlet (com.vmware.flowgate.poweriqworker.model.Outlet)6 ArrayList (java.util.ArrayList)4 PduOutlet (com.vmware.flowgate.common.model.PduOutlet)3 OutletReading (com.vmware.flowgate.poweriqworker.model.OutletReading)3 Pdu (com.vmware.flowgate.poweriqworker.model.Pdu)3 ValueUnit (com.vmware.flowgate.common.model.ValueUnit)2 HashMap (java.util.HashMap)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 Asset (com.vmware.flowgate.common.model.Asset)1 PduInlet (com.vmware.flowgate.common.model.PduInlet)1 Inlet (com.vmware.flowgate.poweriqworker.model.Inlet)1 InletPoleReading (com.vmware.flowgate.poweriqworker.model.InletPoleReading)1 InletReading (com.vmware.flowgate.poweriqworker.model.InletReading)1 Reading (com.vmware.flowgate.poweriqworker.model.Reading)1 SensorReading (com.vmware.flowgate.poweriqworker.model.SensorReading)1 IOException (java.io.IOException)1 DecimalFormat (java.text.DecimalFormat)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1