source: josm/trunk/test/unit/org/openstreetmap/josm/gui/layer/WMTSLayerTest.java@ 9430

Last change on this file since 9430 was 9430, checked in by Don-vip, 8 years ago

add basic unit tests for tile source layers

File size: 925 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.layer;
3
4import static org.junit.Assert.assertEquals;
5
6import org.junit.BeforeClass;
7import org.junit.Test;
8import org.openstreetmap.josm.JOSMFixture;
9import org.openstreetmap.josm.data.imagery.ImageryInfo;
10import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
11
12/**
13 * Unit tests of {@link WMTSLayer} class.
14 */
15public class WMTSLayerTest {
16
17 /**
18 * Setup tests
19 */
20 @BeforeClass
21 public static void setUpBeforeClass() {
22 JOSMFixture.createUnitTestFixture().init();
23 }
24
25 /**
26 * Unit test of {@link WMTSLayer#WMTSLayer}.
27 */
28 @Test
29 public void testTMSLayer() {
30 WMTSLayer wmts = new WMTSLayer(new ImageryInfo("test wmts", "http://localhost", "wmts", null, null));
31 assertEquals(ImageryType.WMTS, wmts.getInfo().getImageryType());
32 }
33}
Note: See TracBrowser for help on using the repository browser.