Ignore:
Timestamp:
2020-06-11T11:32:21+02:00 (4 years ago)
Author:
simon04
Message:

see #19369 - TaginfoAction.withTaginfoUrl: simplify construction of custom instances, share Consumer objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/TaginfoActionTest.java

    r16596 r16597  
    44import static org.junit.Assert.assertEquals;
    55import static org.junit.Assert.assertNull;
     6
     7import javax.swing.Action;
    68
    79import org.junit.Rule;
     
    3638     */
    3739    @Test
     40    public void testCustomInstance() {
     41        TaginfoAction action = new TaginfoAction(() -> null, () -> null).withTaginfoUrl("example.com", "https://taginfo.example.com////");
     42        assertEquals("example.com", action.getValue(Action.NAME));
     43        assertEquals("https://taginfo.example.com/keys/railway", action.getTaginfoUrlForTag(new Tag("railway")));
     44    }
     45
     46    /**
     47     * Unit test of {@link TaginfoAction#toTagHistoryAction()}
     48     */
     49    @Test
    3850    public void testTagHistoryUrls() {
    3951        TaginfoAction action = new TaginfoAction(() -> null, () -> null).toTagHistoryAction();
Note: See TracChangeset for help on using the changeset viewer.