Changeset 10547 in josm for trunk/test/unit
- Timestamp:
- 2016-07-17T13:07:14+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/layer
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/ImageryLayerTest.java
r10300 r10547 2 2 package org.openstreetmap.josm.gui.layer; 3 3 4 import static org.junit.Assert.assertEquals; 4 import static org.junit.Assert.assertNotNull; 5 import static org.junit.Assert.assertSame; 5 6 6 import org.junit. BeforeClass;7 import org.junit.Rule; 7 8 import org.junit.Test; 8 import org.openstreetmap.josm.JOSMFixture; 9 import org.openstreetmap.josm.gui.layer.imagery.ImageryFilterSettings; 10 import org.openstreetmap.josm.testutils.JOSMTestRules; 11 12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 9 13 10 14 /** … … 14 18 15 19 /** 16 * Setup tests20 * For creating layers 17 21 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(true); 21 } 22 @Rule 23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 24 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 25 23 26 /** 24 * Unit test of {@link ImageryLayer.ColorfulImageProcessor#toString} 25 * and {@link ImageryLayer.GammaImageProcessor#toString()}. 26 * and {@link ImageryLayer.SharpenImageProcessor#toString()}. 27 * Unit test of {@link ImageryLayer#getFilterSettings()} 27 28 */ 28 29 @Test 29 public void test ToString() {30 public void testHasSettings() { 30 31 ImageryLayer layer = TMSLayerTest.createTmsLayer(); 31 assertEquals("ColorfulImageProcessor [colorfulness=1.0]", layer.collorfulnessImageProcessor.toString());32 assert Equals("GammaImageProcessor [gamma=1.0]", layer.gammaImageProcessor.toString());33 assert Equals("SharpenImageProcessor [sharpenLevel=1.0]", layer.sharpenImageProcessor.toString());32 ImageryFilterSettings settings = layer.getFilterSettings(); 33 assertNotNull(settings); 34 assertSame(settings, layer.getFilterSettings()); 34 35 } 35 36 }
Note:
See TracChangeset
for help on using the changeset viewer.