findHighestAlarmStatus: test for no alarm created, code cleaning

This commit is contained in:
AndrewVolostnykhThingsboard 2021-01-27 12:22:36 +02:00
parent beeade8b07
commit f54dc932f7
2 changed files with 5 additions and 2 deletions

View File

@ -368,6 +368,9 @@ public abstract class BaseAlarmServiceTest extends AbstractServiceTest {
customerDevice.setCustomerId(customer.getId());
customerDevice = deviceService.saveDevice(customerDevice);
// no one alarms was created
Assert.assertNull(alarmService.findHighestAlarmSeverity(tenantId, customerDevice.getId(), null, null));
Alarm alarm1 = Alarm.builder()
.tenantId(tenantId)
.originator(customerDevice.getId())