Commit f54dc932f7cc674b2f5b536abd2df1ca70cb9bd9
1 parent
beeade8b
findHighestAlarmStatus: test for no alarm created, code cleaning
Showing
2 changed files
with
5 additions
and
2 deletions
... | ... | @@ -81,7 +81,7 @@ public interface AlarmRepository extends CrudRepository<AlarmEntity, UUID> { |
81 | 81 | " AND alarm.originatorId = :entityId" + |
82 | 82 | " AND ((:status) IS NULL OR alarm.status in (:status))") |
83 | 83 | Set<AlarmSeverity> findAlarmSeverities(@Param("tenantId") UUID tenantId, |
84 | - @Param("entityId") UUID entityId, | |
85 | - @Param("status") Set<AlarmStatus> status); | |
84 | + @Param("entityId") UUID entityId, | |
85 | + @Param("status") Set<AlarmStatus> status); | |
86 | 86 | |
87 | 87 | } | ... | ... |
... | ... | @@ -368,6 +368,9 @@ public abstract class BaseAlarmServiceTest extends AbstractServiceTest { |
368 | 368 | customerDevice.setCustomerId(customer.getId()); |
369 | 369 | customerDevice = deviceService.saveDevice(customerDevice); |
370 | 370 | |
371 | + // no one alarms was created | |
372 | + Assert.assertNull(alarmService.findHighestAlarmSeverity(tenantId, customerDevice.getId(), null, null)); | |
373 | + | |
371 | 374 | Alarm alarm1 = Alarm.builder() |
372 | 375 | .tenantId(tenantId) |
373 | 376 | .originator(customerDevice.getId()) | ... | ... |