source: josm/trunk/test/unit/org/openstreetmap/josm/data/oauth/OsmPrivilegesTest.java@ 10201

Last change on this file since 10201 was 9666, checked in by stoecker, 8 years ago

see #12410 fix style of tests

File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.oauth;
3
4import static org.junit.Assert.assertFalse;
5import static org.junit.Assert.assertTrue;
6
7import org.junit.Test;
8
9/**
10 * Unit tests for class {@link OsmPrivileges}.
11 */
12public 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}
Note: See TracBrowser for help on using the repository browser.