Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (13 months ago)
Author:
Don-vip
Message:

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

Location:
trunk/test/unit/org/openstreetmap/josm/data/notes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteCommentTest.java

    r10945 r17275  
    22package org.openstreetmap.josm.data.notes;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertFalse;
    6 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    88import java.util.Date;
    99
    10 import org.junit.Rule;
    11 import org.junit.Test;
     10import org.junit.jupiter.api.extension.RegisterExtension;
     11import org.junit.jupiter.api.Test;
    1212import org.openstreetmap.josm.testutils.JOSMTestRules;
    1313
     
    1717 * Unit tests for class {@link NoteComment}.
    1818 */
    19 public class NoteCommentTest {
     19class NoteCommentTest {
    2020
    2121    /**
    2222     * Setup test.
    2323     */
    24     @Rule
     24    @RegisterExtension
    2525    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2626    public JOSMTestRules test = new JOSMTestRules();
     
    3030     */
    3131    @Test
    32     public void testNoteComment() {
     32    void testNoteComment() {
    3333        NoteComment comment = new NoteComment(new Date(), null, "foo", null, true);
    3434        assertEquals("foo", comment.toString());
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java

    r13079 r17275  
    22package org.openstreetmap.josm.data.notes;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertNotEquals;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNotEquals;
    66
    77import java.util.Date;
    88
    9 import org.junit.Rule;
    10 import org.junit.Test;
     9import org.junit.jupiter.api.extension.RegisterExtension;
     10import org.junit.jupiter.api.Test;
    1111import org.openstreetmap.josm.TestUtils;
    1212import org.openstreetmap.josm.data.coor.LatLon;
     
    2020 * Unit tests for class {@link NoteComment}.
    2121 */
    22 public class NoteTest {
     22class NoteTest {
    2323
    2424    /**
    2525     * Setup test.
    2626     */
    27     @Rule
     27    @RegisterExtension
    2828    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2929    public JOSMTestRules test = new JOSMTestRules();
     
    3333     */
    3434    @Test
    35     public void testToString() {
     35    void testToString() {
    3636        Note note = new Note(LatLon.ZERO);
    3737        assertEquals("Note 0: null", note.toString());
     
    4444     */
    4545    @Test
    46     public void testUpdateWith() {
     46    void testUpdateWith() {
    4747        Note n1 = new Note(LatLon.ZERO);
    4848        n1.setId(1);
     
    5858     */
    5959    @Test
    60     public void testEqualsContract() {
     60    void testEqualsContract() {
    6161        TestUtils.assumeWorkingEqualsVerifier();
    6262        EqualsVerifier.forClass(Note.class).usingGetClass()
Note: See TracChangeset for help on using the changeset viewer.