Ignore:
Timestamp:
2018-07-26T22:01:31+02:00 (6 years ago)
Author:
Don-vip
Message:

see #16010 - use JMockit to enable more extensive test coverage (patch by ris, modified)

see https://github.com/openstreetmap/josm/pull/24/commits for details

File:
1 edited

Legend:

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

    r13219 r14052  
    33
    44import java.util.Optional;
     5
     6import javax.swing.JOptionPane;
    57
    68import org.junit.After;
     
    1820import org.openstreetmap.josm.io.UploadStrategySpecification;
    1921import org.openstreetmap.josm.testutils.JOSMTestRules;
     22import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
     23
     24import com.google.common.collect.ImmutableMap;
    2025
    2126import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    3742    @Rule
    3843    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public JOSMTestRules test = new JOSMTestRules();
     44    public JOSMTestRules test = new JOSMTestRules().assertionsInEDT();
    4045
     46    /**
     47     * Bootstrap.
     48     */
    4149    @Before
    4250    public void bootStrap() {
     51        new JOptionPaneSimpleMocker(ImmutableMap.of(
     52            "A background upload is already in progress. Kindly wait for it to finish before uploading new changes", JOptionPane.OK_OPTION
     53        ));
     54
    4355        DataSet dataSet = new DataSet();
    4456        Node node1 = new Node();
     
    6072    }
    6173
     74    /**
     75     * Tear down.
     76     */
    6277    @After
    6378    public void tearDown() {
     
    7085    }
    7186
     87    /**
     88     * Test single upload instance.
     89     */
    7290    @Test
    7391    public void testSingleUploadInstance() {
Note: See TracChangeset for help on using the changeset viewer.