Skip to content

Commit

Permalink
Merge pull request #99 from mapillary/fix/osm-changeset
Browse files Browse the repository at this point in the history
fix(OSM changeset): add mapillary as source
  • Loading branch information
jpietri authored Oct 11, 2019
2 parents a226b62 + bcf3e3d commit 88303b8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ plugin.description=Allows the user to work with pictures hosted at mapillary.com
plugin.icon=images/mapillary-logo.svg
plugin.link=https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Mapillary
# Minimum required JOSM version to run this plugin, choose the lowest version possible that is compatible.
# You can check if the plugin compiles against this version by executing `./gradlew minJosmVersionClasses`.
plugin.main.version=14760
# You can check if the plugin compiles against this version by executing `./gradlew compileJava_minJosm`.
plugin.main.version=15371
# Version of JOSM against which the plugin is compiled
# Please check, if the specified version is available for download from https://josm.openstreetmap.de/download/ .
# If not, choose the next higher number that is available, or the gradle build will break.
plugin.compile.version=15238
plugin.compile.version=15438
plugin.requires=apache-commons;apache-http

# Character encoding of Gradle files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ public Icon getIcon() {
return MapillaryPlugin.LOGO.setSize(ImageSizes.LAYER).get();
}

@Override
public String getChangesetSourceTag() {
return "mapillary";
}

@Override
public boolean isMergable(Layer other) {
return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapillary;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -68,6 +69,12 @@ public void testGetInfoComponent() {
assertTrue(((String) comp).length() >= 9);
}

@Test
public void testGetChangesetSourceTag() {
String actualChangesetSourceTag = MapillaryLayer.getInstance().getChangesetSourceTag();
assertEquals("OpenStreetmap changeset source for Mapillary layer should be 'mapillary'", "mapillary", actualChangesetSourceTag);
}

@Test
public void testClearInstance() {
MapillaryLayer.getInstance();
Expand Down

0 comments on commit 88303b8

Please sign in to comment.