/** Test fetch update light status. */ @Test public void testFetchUpdateLightStatus() { // Success situation ProcessRequest request = TestBaseUtil.createProcessRequest(); request.setProcess(TestBaseUtil.createProcess(TestBaseUtil.createLight(), null)); InternalResultsResponse<Light> response = getSmartPointAccessorBCL().fetchUpdateLightStatus(request); assertResultResponse(response); }
/** Test fetch all lights by process. */ @Test public void testFetchAllLightsByProcess() { // Success situation ProcessRequest request = TestBaseUtil.createProcessRequest(); Process process = TestBaseUtil.createProcess(TestBaseUtil.createLight(), null); request.setProcess(process); InternalResultsResponse<Light> response = getSmartPointAccessorBCL().fetchAllLightsByProcess(request); assertResultResponse(response); resetMocksToSmartPointArea(); // Error situation setSituation( getSmartPointAccessorBCL(), SituationsEnum.ERROR, ISmartPointDAC.class, "fetchAllLightsByProcess"); response = getSmartPointAccessorBCL().fetchAllLightsByProcess(request); assertMessages(response, ERROR_CODE); }