projects
/
cfb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6448f6
)
Another unit test.
author
Chris Jaekl
<cejaekl@yahoo.com>
Sat, 9 Jan 2016 09:27:53 +0000
(18:27 +0900)
committer
Chris Jaekl
<cejaekl@yahoo.com>
Sat, 9 Jan 2016 09:27:53 +0000
(18:27 +0900)
test/net/jaekl/cfb/util/EnvTest.java
[new file with mode: 0644]
patch
|
blob
diff --git a/test/net/jaekl/cfb/util/EnvTest.java
b/test/net/jaekl/cfb/util/EnvTest.java
new file mode 100644
(file)
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);
+ }
+ }
+}