aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/filter/StateDisabledFilterTest.java
blob: 71a1134e0e373018d25745f841e3f5b2300dba1a (plain)
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
package cgeo.geocaching.filter;

import static org.assertj.core.api.Assertions.assertThat;

import cgeo.CGeoTestCase;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.filter.StateFilter.StateDisabledFilter;

public class StateDisabledFilterTest extends CGeoTestCase {

    private StateFilter.StateDisabledFilter disabledFilter;
    private Geocache disabledCache;

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        disabledFilter = new StateDisabledFilter();
        disabledCache = new Geocache();
        disabledCache.setDisabled(true);
    }

    public void testAccepts() {
        assertThat(disabledFilter.accepts(disabledCache)).isTrue();
        assertThat(disabledFilter.accepts(new Geocache())).isFalse();
    }

}