1 package ch.qos.logback.classic.util;
2
3 import ch.qos.logback.core.util.EnvUtil;
4 import org.junit.jupiter.api.BeforeEach;
5 import org.junit.jupiter.api.Test;
6
7 import static org.junit.jupiter.api.Assertions.assertNotNull;
8 import static org.junit.jupiter.api.Assertions.assertTrue;
9 public class EnvUtilTest {
10
11
12
13
14 static final String EXPECTED_VERSION = "1.5";
15
16
17 @BeforeEach
18 public void setUp() throws Exception {
19
20 }
21
22
23
24
25 @Test
26 public void versionTest() {
27 String versionStr = EnvUtil.logbackVersion();
28 assertNotNull(versionStr);
29 assertTrue(versionStr.startsWith(EXPECTED_VERSION));
30 }
31
32
33
34 }