Ignore:
Timestamp:
2021-04-07T22:34:03+02:00 (4 years ago)
Author:
simon04
Message:

see #14176 - Migrate Note/NoteComment to Instant

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

    r17275 r17712  
    66import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    8 import java.util.Date;
     8import java.time.Instant;
    99
    1010import org.junit.jupiter.api.extension.RegisterExtension;
     
    3131    @Test
    3232    void testNoteComment() {
    33         NoteComment comment = new NoteComment(new Date(), null, "foo", null, true);
     33        NoteComment comment = new NoteComment(Instant.now(), null, "foo", null, true);
    3434        assertEquals("foo", comment.toString());
    3535        assertTrue(comment.isNew());
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java

    r17275 r17712  
    55import static org.junit.jupiter.api.Assertions.assertNotEquals;
    66
    7 import java.util.Date;
     7import java.time.Instant;
    88
    99import org.junit.jupiter.api.extension.RegisterExtension;
     
    3636        Note note = new Note(LatLon.ZERO);
    3737        assertEquals("Note 0: null", note.toString());
    38         note.addComment(new NoteComment(new Date(), null, "foo", null, true));
     38        note.addComment(new NoteComment(Instant.now(), null, "foo", null, true));
    3939        assertEquals("Note 0: foo", note.toString());
    4040    }
     
    6565            .withPrefabValues(LatLon.class, LatLon.ZERO, new LatLon(1, 1))
    6666            .withPrefabValues(NoteComment.class,
    67                     new NoteComment(new Date(), null, "foo", null, true),
    68                     new NoteComment(new Date(), null, "bar", null, false))
     67                    new NoteComment(Instant.now(), null, "foo", null, true),
     68                    new NoteComment(Instant.now(), null, "bar", null, false))
    6969            .verify();
    7070    }
Note: See TracChangeset for help on using the changeset viewer.