source: josm/trunk/test/unit/org/openstreetmap/josm/data/notes/NoteCommentTest.java@ 17275

Last change on this file since 17275 was 17275, checked in by Don-vip, 3 years ago

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

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

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.notes;
3
4import static org.junit.jupiter.api.Assertions.assertEquals;
5import static org.junit.jupiter.api.Assertions.assertFalse;
6import static org.junit.jupiter.api.Assertions.assertTrue;
7
8import java.util.Date;
9
10import org.junit.jupiter.api.extension.RegisterExtension;
11import org.junit.jupiter.api.Test;
12import org.openstreetmap.josm.testutils.JOSMTestRules;
13
14import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
15
16/**
17 * Unit tests for class {@link NoteComment}.
18 */
19class NoteCommentTest {
20
21 /**
22 * Setup test.
23 */
24 @RegisterExtension
25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
26 public JOSMTestRules test = new JOSMTestRules();
27
28 /**
29 * Unit test of {@link NoteComment} class.
30 */
31 @Test
32 void testNoteComment() {
33 NoteComment comment = new NoteComment(new Date(), null, "foo", null, true);
34 assertEquals("foo", comment.toString());
35 assertTrue(comment.isNew());
36 comment.setNew(false);
37 assertFalse(comment.isNew());
38 }
39}
Note: See TracBrowser for help on using the repository browser.