Menu

[21d594]: / test / java / nginx / clojure / CaseInsensitiveMapTest.java  Maximize  Restore  History

Download this file

40 lines (30 with data), 797 Bytes

 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
37
38
39
package nginx.clojure;
import static org.junit.Assert.assertEquals;
import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class CaseInsensitiveMapTest {
Map<String, String> m;
@Before
public void setUp() throws Exception {
m = new CaseInsensitiveMap<String>();
m.put("Good", "good");
m.put("BAD", "bad");
m.put("very", "very");
}
@After
public void tearDown() throws Exception {
}
@Test
public void testFind() {
assertEquals("good", m.get("good"));
assertEquals("good", m.get("Good"));
assertEquals(null, m.get("good1"));
assertEquals("bad", m.get("BAD"));
assertEquals("bad", m.get("bAD"));
assertEquals("bad", m.get("bad"));
assertEquals("very", m.get("very"));
assertEquals("very", m.get("VerY"));
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.