import legitimacyCheck from '../../../src/utils/legitimacyCheck'
import {DEVICE_COLLECTION} from "../../../test/mock/deviceState/DeviceMock"

describe('legitimacyCheck', () => {
  it("should ipCheck", () => {
    let lc = legitimacyCheck()
    let ifIp = lc.ipCheck('192.168.8.57')
    expect(ifIp).to.equal(true)
  })
})

describe('legitimacyCheck', () => {
  it("should textLengthCheck", () => {
    let lc = legitimacyCheck()
    let ifIp = lc.textLengthCheck('ererererer')
    expect(ifIp).to.equal(true)
  })
})

describe('legitimacyCheck', () => {
  it("should numberCheck", () => {
    let lc = legitimacyCheck()
    let ifIp = lc.numberCheck('3333')
    expect(ifIp).to.equal(true)
  })
})

describe('legitimacyCheck', () => {
  it("should textNullCheck", () => {
    let lc = legitimacyCheck()
    let ifIp = lc.textNullCheck('ddd')
    expect(ifIp).to.equal(true)
  })
})

describe ('legitimacyCheck', () => {
  it("should checkListEqual", () => {
    let list1 = ['3', '2', '1']
    let list2 = ['1', '2', '2']
    let lc = legitimacyCheck()
    let isEqual = lc.checkListEqual(list1, list2)
    expect(isEqual).to.equal(false)
  })
})

describe ('legitimacyCheck', () => {
  it("should cmpObject", () => {
    let object1 = DEVICE_COLLECTION
    let object2 = DEVICE_COLLECTION
    let lc = legitimacyCheck()
    let isEqual = lc.compareObject(object1['111'], object2['222'])
    expect(isEqual).to.equal(false)
  })
})

describe ('legitimacyCheck', () => {
  it("should cmpObject", () => {
    let object1 = DEVICE_COLLECTION
    let object2 = DEVICE_COLLECTION
    let lc = legitimacyCheck()
    let isEqual = lc.compareObject(object1['111'], object2['111'])
    expect(isEqual).to.equal(true)
  })
})

// describe('legitimacyCheck', () => {
//   it("should timeCheck", () => {
//     let lc = legitimacyCheck()
//     let ifIp = lc.timeCheck('20190329.182828.81')
//     expect(ifIp).to.equal(true)
//   })
// })
