import AlarmManager from '@/domain/models/AlarmManager.js'
import {ALARM_COLLECTION,UNCONFIRMED_ALARMLIST} from "../../../mock/deviceState/AlarmManagerMock";

describe ('AlarmManager', () => {
  it("should findAlarmByKey", () => {

    let alarmCollection = ALARM_COLLECTION

    let alarmMgr = AlarmManager(alarmCollection)
    let alarm = alarmMgr.findAlarmByKey("1")
    expect(alarm).to.eql(alarmCollection["1"])
  })
})

describe ('AlarmManager', () => {
  it("should getUnConfirmedAlarmList", () => {

    let alarmCollection = ALARM_COLLECTION
    let unConfirmedAlarmList = UNCONFIRMED_ALARMLIST

    let alarmMgr = AlarmManager(alarmCollection)
    let alarmList = alarmMgr.getUnConfirmedAlarmList()
    expect(alarmList).to.eql(unConfirmedAlarmList)
  })
})
