From 09dac341ca50075e344dcdd760c445156b7c1d62 Mon Sep 17 00:00:00 2001 From: Chris Jaekl Date: Sat, 9 Jan 2016 18:27:53 +0900 Subject: [PATCH] Another unit test. --- test/net/jaekl/cfb/util/EnvTest.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/net/jaekl/cfb/util/EnvTest.java diff --git a/test/net/jaekl/cfb/util/EnvTest.java b/test/net/jaekl/cfb/util/EnvTest.java new file mode 100644 index 0000000..254712d --- /dev/null +++ b/test/net/jaekl/cfb/util/EnvTest.java @@ -0,0 +1,27 @@ +package net.jaekl.cfb.util; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class EnvTest { + + @Test + public void test() { + String[] names = { + "HOME", + "THIS_ENVIRONMENT_VARIABLE_IS_NOT_SET", + "TEMP", + "TMP", + "USER" + }; + + EnvMock.mock_resetInstance(); + + for (String name : names) { + String expected = System.getenv(name); + String actual = Env.get(name); + assertEquals(expected, actual); + } + } +} -- 2.39.2