Changeset 17837 in josm for trunk/test
- Timestamp:
- 2021-04-30T21:52:45+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java
r17712 r17837 6 6 7 7 import java.time.Instant; 8 import java.util.List; 8 9 9 10 import org.junit.jupiter.api.extension.RegisterExtension; … … 11 12 import org.openstreetmap.josm.TestUtils; 12 13 import org.openstreetmap.josm.data.coor.LatLon; 14 import org.openstreetmap.josm.io.NoteReader; 13 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 16 … … 69 71 .verify(); 70 72 } 73 74 @Test 75 void testSorting() throws Exception { 76 List<Note> list = new NoteReader("" + 77 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + 78 "<osm version=\"0.6\" generator=\"OpenStreetMap server\">\n" + 79 "<note lon=\"68.86415\" lat=\"36.7232991\">\n"+ 80 " <id>4</id>\n"+ 81 " <url>http://api.openstreetmap.org/api/0.6/notes/4</url>\n"+ 82 " <reopen_url>http://api.openstreetmap.org/api/0.6/notes/4/reopen</reopen_url>\n"+ 83 " <date_created>2013-04-24 08:07:02 UTC</date_created>\n"+ 84 " <status>closed</status>\n"+ 85 " <date_closed>2013-04-24 08:08:51 UTC</date_closed>\n"+ 86 " <comments>\n"+ 87 " <comment>\n"+ 88 " <date>2013-04-24 08:07:02 UTC</date>\n"+ 89 " <uid>1626</uid>\n"+ 90 " <user>FredB</user>\n"+ 91 " <user_url>http://www.openstreetmap.org/user/FredB</user_url>\n"+ 92 " <action>opened</action>\n"+ 93 " <text>test</text>\n"+ 94 " <html><p>test</p></html>\n"+ 95 " </comment>\n"+ 96 " <comment>\n"+ 97 " <date>2013-04-24 08:08:51 UTC</date>\n"+ 98 " <uid>1626</uid>\n"+ 99 " <user>FredB</user>\n"+ 100 " <user_url>http://www.openstreetmap.org/user/FredB</user_url>\n"+ 101 " <action>closed</action>\n"+ 102 " <text></text>\n"+ 103 " <html><p></p></html>\n"+ 104 " </comment>\n"+ 105 " </comments>\n"+ 106 "</note>\n"+ 107 "<note lon=\"23.2663071\" lat=\"50.7173607\">\n" + 108 " <id>1396945</id>\n" + 109 " <url>https://www.openstreetmap.org/api/0.6/notes/1396945</url>\n" + 110 " <comment_url>https://www.openstreetmap.org/api/0.6/notes/1396945/comment</comment_url>\n" + 111 " <close_url>https://www.openstreetmap.org/api/0.6/notes/1396945/close</close_url>\n" + 112 " <date_created>2018-05-17 15:41:06 UTC</date_created>\n" + 113 " <status>open</status>\n" + 114 " <comments>\n" + 115 " </comments>\n" + 116 "</note>\n" + 117 "</osm>\n").parse(); 118 // Non-regression test for ticket #20824 119 list.sort(Note.DATE_COMPARATOR); 120 list.sort(Note.DEFAULT_COMPARATOR); 121 list.sort(Note.LAST_ACTION_COMPARATOR); 122 list.sort(Note.USER_COMPARATOR); 123 } 71 124 }
Note:
See TracChangeset
for help on using the changeset viewer.