1
2
3
4
5
6
7 package nl.mineleni.cbsviewer.servlet.wms;
8
9 import static org.junit.Assert.assertEquals;
10
11 import org.junit.Before;
12 import org.junit.Test;
13
14
15
16
17
18
19
20 public class AttributesNamesFilterTest {
21
22 private AttributesNamesFilter filter;
23
24
25 private final String hasFilterID = "wijkenbuurten2011_thema_gemeenten2011_aantal_inwoners";
26
27
28 private final String hasNoFilterID = "vierkanten500m_oad2000";
29
30
31
32
33
34
35
36 @Before
37 public void setUp() throws Exception {
38 this.filter = new AttributesNamesFilter();
39 }
40
41
42
43
44
45
46 @Test
47 public void testFilterValue() {
48 assertEquals("expected",
49 this.filter.filterValue("expected", this.hasFilterID));
50 assertEquals("gemeente",
51 this.filter.filterValue("gemnaam", this.hasFilterID));
52 assertEquals("expected",
53 this.filter.filterValue("expected", this.hasNoFilterID));
54 }
55 }