Changeset 17720 in josm for trunk/test


Ignore:
Timestamp:
2021-04-09T00:55:40+02:00 (3 years ago)
Author:
simon04
Message:

see #14176 - Migrate ChangesetDiscussionComment to Instant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetDiscussionCommentTest.java

    r17275 r17720  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import java.util.Date;
     6import java.time.Instant;
    77
    88import org.junit.jupiter.api.extension.RegisterExtension;
     
    2929    @Test
    3030    void testChangesetDiscussionComment() {
    31         Date d = new Date(1000);
     31        Instant d = Instant.ofEpochMilli(1000);
    3232        User foo = User.createOsmUser(1, "foo");
    3333        ChangesetDiscussionComment cdc = new ChangesetDiscussionComment(d, foo);
    3434        assertEquals(d, cdc.getDate());
    3535        assertEquals(foo, cdc.getUser());
    36         assertEquals("ChangesetDiscussionComment [date=Thu Jan 01 00:00:01 UTC 1970, user=id:1 name:foo, text='null']", cdc.toString());
     36        assertEquals("ChangesetDiscussionComment [date=1970-01-01T00:00:01Z, user=id:1 name:foo, text='null']", cdc.toString());
    3737    }
    3838
     
    4242    @Test
    4343    void testText() {
    44         ChangesetDiscussionComment cdc = new ChangesetDiscussionComment(new Date(), null);
     44        ChangesetDiscussionComment cdc = new ChangesetDiscussionComment(Instant.now(), null);
    4545        cdc.setText("foo");
    4646        assertEquals("foo", cdc.getText());
Note: See TracChangeset for help on using the changeset viewer.