import SubnetManager from '@/domain/models/SubnetManager.js'
import {SUBNET_COLLECTION} from "../../../mock/deviceState/SubnetMock"
import {DEVICELIST_IN_SUBNET} from "../../../mock/deviceState/DeviceMock"
describe('SubnetManager', () => {
it("should findSubnetBykey", () => {
let subnetCollection = SUBNET_COLLECTION
let subnetMgr = SubnetManager(subnetCollection)
let subnet = subnetMgr.findSubnetByKey("001")
expect(subnet).to.eql(subnetCollection["001"])
})
})
describe('SubnetManager', () => {
it("should findSubnetDeviceByKey", () => {
let subnetCollection = SUBNET_COLLECTION
let subnetMgr = SubnetManager(subnetCollection)
let deviceList = subnetMgr.findSubnetDeviceByKey("001")
expect(deviceList).to.eql(subnetCollection["001"].deviceList)
})
})
-
YazhouChen authored692c6291