Changeset 17275 in josm for trunk/test/unit/org/openstreetmap/josm/gui/layer/LayerTest.java
- Timestamp:
- 2020-10-28T20:41:00+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/LayerTest.java
r15496 r17275 2 2 package org.openstreetmap.josm.gui.layer; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertNotNull;7 import static org.junit. Assert.assertNull;8 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertNotNull; 7 import static org.junit.jupiter.api.Assertions.assertNull; 8 import static org.junit.jupiter.api.Assertions.assertTrue; 9 9 10 10 import java.io.File; 11 11 12 import org.junit. Before;13 import org.junit. Rule;14 import org.junit. Test;12 import org.junit.jupiter.api.BeforeEach; 13 import org.junit.jupiter.api.Test; 14 import org.junit.jupiter.api.extension.RegisterExtension; 15 15 import org.openstreetmap.josm.data.projection.ProjectionRegistry; 16 16 import org.openstreetmap.josm.testutils.JOSMTestRules; … … 22 22 * @author Michael Zangl 23 23 */ 24 publicclass LayerTest {24 class LayerTest { 25 25 /** 26 26 * We need projection 27 27 */ 28 @R ule28 @RegisterExtension 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 30 public JOSMTestRules test = new JOSMTestRules().preferences().projection(); … … 35 35 * Create test layer 36 36 */ 37 @Before 37 @BeforeEach 38 38 public void setUp() { 39 39 testLayer = new LayerManagerTest.TestLayer(); … … 44 44 */ 45 45 @Test 46 publicvoid testIsInfoResizable() {46 void testIsInfoResizable() { 47 47 assertFalse(testLayer.isInfoResizable()); 48 48 } … … 52 52 */ 53 53 @Test 54 publicvoid testAssociatedFile() {54 void testAssociatedFile() { 55 55 assertNull(testLayer.getAssociatedFile()); 56 56 … … 64 64 */ 65 65 @Test 66 publicvoid testGetName() {66 void testGetName() { 67 67 assertEquals("Test Layer", testLayer.getName()); 68 68 } … … 72 72 */ 73 73 @Test 74 publicvoid testSetName() {74 void testSetName() { 75 75 testLayer.setName("Test Layer2"); 76 76 assertEquals("Test Layer2", testLayer.getName()); … … 89 89 */ 90 90 @Test 91 publicvoid testRename() {91 void testRename() { 92 92 assertFalse(testLayer.isRenamed()); 93 93 testLayer.rename("Test Layer2"); … … 100 100 */ 101 101 @Test 102 publicvoid testBackgroundLayer() {102 void testBackgroundLayer() { 103 103 assertFalse(testLayer.isBackgroundLayer()); 104 104 testLayer.setBackgroundLayer(true); … … 110 110 */ 111 111 @Test 112 publicvoid testVisible() {112 void testVisible() { 113 113 assertTrue(testLayer.isVisible()); 114 114 testLayer.setVisible(false); … … 122 122 */ 123 123 @Test 124 publicvoid testToggleVisible() {124 void testToggleVisible() { 125 125 assertTrue(testLayer.isVisible()); 126 126 testLayer.toggleVisible(); … … 134 134 */ 135 135 @Test 136 publicvoid testOpacity() {136 void testOpacity() { 137 137 assertEquals(1, testLayer.getOpacity(), 1e-3); 138 138 … … 152 152 */ 153 153 @Test 154 publicvoid testIsProjectionSupported() {154 void testIsProjectionSupported() { 155 155 assertFalse(testLayer.isProjectionSupported(null)); 156 156 assertTrue(testLayer.isProjectionSupported(ProjectionRegistry.getProjection())); … … 161 161 */ 162 162 @Test 163 publicvoid testNameSupportedProjections() {163 void testNameSupportedProjections() { 164 164 assertNotNull(testLayer.nameSupportedProjections()); 165 165 } … … 169 169 */ 170 170 @Test 171 publicvoid testIsSavable() {171 void testIsSavable() { 172 172 assertFalse(testLayer.isSavable()); 173 173 } … … 177 177 */ 178 178 @Test 179 publicvoid testCheckSaveConditions() {179 void testCheckSaveConditions() { 180 180 assertTrue(testLayer.checkSaveConditions()); 181 181 }
Note:
See TracChangeset
for help on using the changeset viewer.