Last change
on this file since 12564 was 12564, checked in by Don-vip, 7 years ago |
fix unit tests
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.validation.tests;
|
---|
3 |
|
---|
4 | import java.util.stream.Collectors;
|
---|
5 |
|
---|
6 | import org.junit.Rule;
|
---|
7 | import org.junit.Test;
|
---|
8 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
9 |
|
---|
10 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * JUnit Test of coastline validation test.
|
---|
14 | */
|
---|
15 | public class CoastlinesTest {
|
---|
16 |
|
---|
17 | private static final Coastlines COASTLINES = new Coastlines();
|
---|
18 | private static final WronglyOrderedWays WRONGLY_ORDERED_WAYS = new WronglyOrderedWays();
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Setup test.
|
---|
22 | */
|
---|
23 | @Rule
|
---|
24 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
25 | public JOSMTestRules test = new JOSMTestRules();
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Test all error cases manually created in coastline.osm.
|
---|
29 | * @throws Exception in case of error
|
---|
30 | */
|
---|
31 | @Test
|
---|
32 | public void testCoastlineFile() throws Exception {
|
---|
33 | ValidatorTestUtils.testSampleFile("data_nodist/coastlines.osm",
|
---|
34 | ds -> ds.getWays().stream().filter(
|
---|
35 | w -> "coastline".equals(w.get("natural"))).collect(Collectors.toList()),
|
---|
36 | null, COASTLINES, WRONGLY_ORDERED_WAYS);
|
---|
37 | }
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.