Last change
on this file since 16182 was 16182, checked in by simon04, 4 years ago |
Fix typos in Javadoc
|
-
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.tools;
|
---|
3 |
|
---|
4 | import org.junit.Rule;
|
---|
5 | import org.junit.Test;
|
---|
6 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
7 |
|
---|
8 | import static org.junit.Assert.assertEquals;
|
---|
9 |
|
---|
10 | import java.util.Arrays;
|
---|
11 | import java.util.stream.Collectors;
|
---|
12 |
|
---|
13 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
14 | import net.trajano.commons.testing.UtilityClassTestUtil;
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Unit tests of {@link StreamUtils} class.
|
---|
18 | */
|
---|
19 | public class StreamUtilsTest {
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Setup rule.
|
---|
23 | */
|
---|
24 | @Rule
|
---|
25 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
26 | public JOSMTestRules test = new JOSMTestRules();
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Tests that {@code StreamUtils} satisfies utility class criteria.
|
---|
30 | * @throws ReflectiveOperationException if an error occurs
|
---|
31 | */
|
---|
32 | @Test
|
---|
33 | public void testUtilityClass() throws ReflectiveOperationException {
|
---|
34 | UtilityClassTestUtil.assertUtilityClassWellDefined(StreamUtils.class);
|
---|
35 | }
|
---|
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 | }
|
---|
45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.