blob: 76998395e12964a5b8d57a45e14416471b5528f2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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(""));
}
}
|