From: Chris Jaekl Date: Sat, 9 Jan 2016 09:27:53 +0000 (+0900) Subject: Another unit test. X-Git-Url: https://jaekl.net/gitweb/?a=commitdiff_plain;h=09dac341ca50075e344dcdd760c445156b7c1d62;p=cfb.git Another unit test. --- 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); + } + } +}