Files
Roman Shevchenko b558401b52 [platform] machine ID detection: minor optimization, one more Linux source
(cherry-picked from commit bb954b4da53f85c1f0938bb1dc787ee0eb5ba7bc)

IJ-CR-147524

GitOrigin-RevId: 23a8952dbec25061e4d3c3eedf5f100a8d427050
2024-10-28 21:00:43 +00:00

21 lines
651 B
Kotlin

// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.internal.statistic
import com.intellij.internal.statistic.eventLog.fus.MachineIdManager
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Assertions.assertThrows
import org.junit.jupiter.api.Test
class MachineIdManagerTest {
@Test fun smoke() {
assertThat(MachineIdManager.getAnonymizedMachineId("test"))
.isNotBlank
}
@Test fun contract() {
assertThrows(IllegalArgumentException::class.java) {
MachineIdManager.getAnonymizedMachineId("")
}
}
}