Changeset 10097 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2016-04-02T13:04:59+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12717 - Warning about short comments when submitting Chinese comment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java

    r9685 r10097  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.io;
     3
     4import static org.junit.Assert.assertFalse;
     5import static org.junit.Assert.assertTrue;
    36
    47import java.util.Map;
     
    9093        new UploadDialog.UploadAction(newUploadDialog("a comment long enough", "a source long enough")).actionPerformed(null);
    9194    }
     95
     96    /**
     97     * Test of {@link UploadDialog.UploadAction#isUploadCommentTooShort} method.
     98     */
     99    @Test
     100    public void testIsUploadCommentTooShort() {
     101        assertTrue(UploadDialog.UploadAction.isUploadCommentTooShort(""));
     102        assertTrue(UploadDialog.UploadAction.isUploadCommentTooShort("test"));
     103        assertTrue(UploadDialog.UploadAction.isUploadCommentTooShort("测试"));
     104        assertFalse(UploadDialog.UploadAction.isUploadCommentTooShort("geometric corrections"));
     105        assertFalse(UploadDialog.UploadAction.isUploadCommentTooShort("几何校正"));
     106    }
    92107}
Note: See TracChangeset for help on using the changeset viewer.