diff options
author | Arne H Juul <arnej27959@users.noreply.github.com> | 2022-01-20 16:11:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 16:11:51 +0100 |
commit | 3096e5fcd8a3d2c1c507f445de75bf98b8228223 (patch) | |
tree | 5429f97f6609b5a3e224c5194b2fbead00598a04 /vespalog/src/test/java/com/yahoo/log/impl/LogUtilsTest.java | |
parent | f9ad84744b3aacbcc7c035a190d9099b2cf966c8 (diff) | |
parent | a0cbb172c62ce83058f8741f3947092a0faf1c3d (diff) |
Merge pull request #20883 from vespa-engine/arnej/deprecate-vespalog-internals
Arnej/deprecate vespalog internals
Diffstat (limited to 'vespalog/src/test/java/com/yahoo/log/impl/LogUtilsTest.java')
-rw-r--r-- | vespalog/src/test/java/com/yahoo/log/impl/LogUtilsTest.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vespalog/src/test/java/com/yahoo/log/impl/LogUtilsTest.java b/vespalog/src/test/java/com/yahoo/log/impl/LogUtilsTest.java new file mode 100644 index 00000000000..76998395e12 --- /dev/null +++ b/vespalog/src/test/java/com/yahoo/log/impl/LogUtilsTest.java @@ -0,0 +1,36 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.log.impl; + +import org.junit.Test; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; + +/** + * @author Ulf Lilleengen + * @author Bjorn Borud + */ +public class LogUtilsTest { + + @Test + public void testEmpty() { + assertTrue(LogUtils.empty(null)); + assertTrue(LogUtils.empty("")); + assertFalse(LogUtils.empty("f")); + assertFalse(LogUtils.empty("fo")); + assertFalse(LogUtils.empty("foo")); + } + + /** + * Just make sure the static getHostName() method returns something + * that looks half sensible. + */ + @Test + public void testSimple () { + String name = LogUtils.getHostName(); + assertNotNull(name); + assertFalse(name.equals("")); + } + +} |