1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.oauth;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertFalse;
|
---|
5 | import static org.junit.Assert.assertTrue;
|
---|
6 |
|
---|
7 | import org.junit.Test;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Unit tests for class {@link OsmPrivileges}.
|
---|
11 | */
|
---|
12 | public class OsmPrivilegesTest {
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit test of getters/setters.
|
---|
16 | */
|
---|
17 | @Test
|
---|
18 | public void testGettersSetters() {
|
---|
19 | OsmPrivileges p = new OsmPrivileges();
|
---|
20 | assertFalse(p.isAllowModifyNotes());
|
---|
21 | assertFalse(p.isAllowReadGpx());
|
---|
22 | assertFalse(p.isAllowReadPrefs());
|
---|
23 | assertFalse(p.isAllowWriteApi());
|
---|
24 | assertFalse(p.isAllowWriteGpx());
|
---|
25 | assertFalse(p.isAllowWritePrefs());
|
---|
26 | p.setAllowModifyNotes(true);
|
---|
27 | assertTrue(p.isAllowModifyNotes());
|
---|
28 | p.setAllowReadGpx(true);
|
---|
29 | assertTrue(p.isAllowReadGpx());
|
---|
30 | p.setAllowReadPrefs(true);
|
---|
31 | assertTrue(p.isAllowReadPrefs());
|
---|
32 | p.setAllowWriteApi(true);
|
---|
33 | assertTrue(p.isAllowWriteApi());
|
---|
34 | p.setAllowWriteGpx(true);
|
---|
35 | assertTrue(p.isAllowWriteGpx());
|
---|
36 | p.setAllowWritePrefs(true);
|
---|
37 | assertTrue(p.isAllowWritePrefs());
|
---|
38 | }
|
---|
39 | }
|
---|