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.
|
---|
2 | package org.openstreetmap.josm.data.notes;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertEquals;
|
---|
5 | import static org.junit.Assert.assertFalse;
|
---|
6 | import static org.junit.Assert.assertTrue;
|
---|
7 |
|
---|
8 | import java.util.Date;
|
---|
9 |
|
---|
10 | import org.junit.BeforeClass;
|
---|
11 | import org.junit.Test;
|
---|
12 | import org.openstreetmap.josm.JOSMFixture;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests for class {@link NoteComment}.
|
---|
16 | */
|
---|
17 | public 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.