Changeset 15732 in josm for trunk/test


Ignore:
Timestamp:
2020-01-19T18:57:26+01:00 (4 years ago)
Author:
simon04
Message:

see #18503 - Relation editor: compute wayConnection for type=superroute

This basic implementation only considers route segments without a role
(as specified for public_transport:version=2; no forward/backward)
and does not take roundabouts into account.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/StreamUtilsTest.java

    r11921 r15732  
    55import org.junit.Test;
    66import org.openstreetmap.josm.testutils.JOSMTestRules;
     7
     8import static org.junit.Assert.assertEquals;
     9
     10import java.util.Arrays;
     11import java.util.stream.Collectors;
    712
    813import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    2934        UtilityClassTestUtil.assertUtilityClassWellDefined(StreamUtils.class);
    3035    }
     36
     37    /**
     38     * Tests {@link StreamUtils#reversedStream(java.util.List)}
     39     */
     40    @Test
     41    public void testReverseStream() {
     42        assertEquals("baz/bar/foo",
     43                StreamUtils.reversedStream(Arrays.asList("foo", "bar", "baz")).collect(Collectors.joining("/")));
     44    }
    3145}
Note: See TracChangeset for help on using the changeset viewer.