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

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

convert more unit tests to JOSMTestRules

  • Property svn:eol-style set to native
File size: 1023 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.notes;
3
4import static org.junit.Assert.assertEquals;
5import static org.junit.Assert.assertFalse;
6import static org.junit.Assert.assertTrue;
7
8import java.util.Date;
9
10import org.junit.Rule;
11import org.junit.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 */
19public class NoteCommentTest {
20
21 /**
22 * Setup test.
23 */
24 @Rule
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 public 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.