Search in sources :

Example 1 with PierTestCheck

use of org.openstreetmap.atlas.checks.base.checks.PierTestCheck in project atlas-checks by osmlab.

the class PierTest method testPierOverrideSkip.

/**
 * Test the pier override value that will allow piers to be processed.
 */
@Test
public void testPierOverrideSkip() {
    final String configSource = "{\"PierTestCheck.accept.piers\": true}";
    final PierTestCheck check = new PierTestCheck(ConfigurationResolver.inlineConfiguration(configSource));
    final Set<CheckFlag> flags = Iterables.stream(check.flags(setup.getAtlas())).collectToSet();
    Assert.assertEquals(3, flags.size());
}
Also used : PierTestCheck(org.openstreetmap.atlas.checks.base.checks.PierTestCheck) CheckFlag(org.openstreetmap.atlas.checks.flag.CheckFlag) Test(org.junit.Test)

Example 2 with PierTestCheck

use of org.openstreetmap.atlas.checks.base.checks.PierTestCheck in project atlas-checks by osmlab.

the class PierTest method testPierSkip.

/**
 * Test default behavior to make sure the pier override value when explicitly set to false
 * maintains the behavior of not allowing piers to be processed
 */
@Test
public void testPierSkip() {
    final String configSource = "{\"PierTestCheck.accept.piers\": false}";
    final PierTestCheck check = new PierTestCheck(ConfigurationResolver.inlineConfiguration(configSource));
    final Set<CheckFlag> flags = Iterables.stream(check.flags(setup.getAtlas())).collectToSet();
    Assert.assertEquals(2, flags.size());
    flags.forEach(flag -> Assert.assertNotEquals(100, flag.getIdentifier()));
}
Also used : PierTestCheck(org.openstreetmap.atlas.checks.base.checks.PierTestCheck) CheckFlag(org.openstreetmap.atlas.checks.flag.CheckFlag) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 PierTestCheck (org.openstreetmap.atlas.checks.base.checks.PierTestCheck)2 CheckFlag (org.openstreetmap.atlas.checks.flag.CheckFlag)2