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

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

add more unit tests

  • Property svn:eol-style set to native
File size: 930 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.BeforeClass;
11import org.junit.Test;
12import org.openstreetmap.josm.JOSMFixture;
13
14/**
15 * Unit tests for class {@link NoteComment}.
16 */
17public class NoteCommentTest {
18
19 /**
20 * Setup test.
21 */
22 @BeforeClass
23 public static void init() {
24 JOSMFixture.createUnitTestFixture().init();
25 }
26
27 /**
28 * Unit test of {@link NoteComment} class.
29 */
30 @Test
31 public void testNoteComment() {
32 NoteComment comment = new NoteComment(new Date(), null, "foo", null, true);
33 assertEquals("foo", comment.toString());
34 assertTrue(comment.isNew());
35 comment.setNew(false);
36 assertFalse(comment.isNew());
37 }
38}
Note: See TracBrowser for help on using the repository browser.