use of org.apache.cloudstack.usage.UsageService in project cloudstack by apache.
the class UsageCmdTest method testExecuteEmptyResult.
@Test
public void testExecuteEmptyResult() {
UsageService usageService = Mockito.mock(UsageService.class);
Pair<List<? extends Usage>, Integer> usageRecords = new Pair<List<? extends Usage>, Integer>(new ArrayList<Usage>(), new Integer(0));
Mockito.when(usageService.getUsageRecords(getUsageRecordsCmd)).thenReturn(usageRecords);
getUsageRecordsCmd._usageService = usageService;
getUsageRecordsCmd.execute();
}
use of org.apache.cloudstack.usage.UsageService in project cloudstack by apache.
the class UsageCmdTest method testExecuteSuccess.
@Test
public void testExecuteSuccess() {
UsageService usageService = Mockito.mock(UsageService.class);
getUsageRecordsCmd._usageService = usageService;
getUsageRecordsCmd.execute();
}