Changeset 9546 in josm for trunk


Ignore:
Timestamp:
2016-01-20T01:10:10+01:00 (9 years ago)
Author:
Don-vip
Message:

add more unit tests, fix packages, rename manual functional unit tests (with a main() method) to *TestFT.java

Location:
trunk
Files:
8 added
1 deleted
3 edited
12 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r9484 r9546  
    44import java.awt.Component;
    55import java.awt.Dimension;
     6import java.awt.GraphicsEnvironment;
    67import java.awt.Toolkit;
    78import java.awt.event.MouseAdapter;
     
    166167        if (prototype != null) {
    167168            setPrototypeDisplayValue(prototype);
    168             int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
     169            int screenHeight = GraphicsEnvironment.isHeadless() ? 600 : Toolkit.getDefaultToolkit().getScreenSize().height;
    169170            // Compute maximum number of visible items based on the preferred size of the combo box.
    170171            // This assumes that items have the same height as the combo box, which is not granted by the look and feel
  • trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTestFT.java

    r9543 r9546  
    66import javax.swing.JFrame;
    77
    8 import org.junit.Ignore;
    98import org.openstreetmap.josm.data.conflict.Conflict;
    109import org.openstreetmap.josm.data.osm.Node;
     
    1211import org.openstreetmap.josm.data.osm.Way;
    1312
    14 @Ignore
    15 public class NodeListMergerTest extends JFrame {
    16 
     13public class NodeListMergerTestFT extends JFrame {
    1714
    1815    private NodeListMerger nodeListMerger;
     
    6562     * Constructs a new {@code NodeListMergerTest}.
    6663     */
    67     public NodeListMergerTest() {
     64    public NodeListMergerTestFT() {
    6865        build();
    6966        populate();
     
    7168
    7269    public static void main(String[] args) {
    73         NodeListMergerTest test = new NodeListMergerTest();
     70        NodeListMergerTestFT test = new NodeListMergerTestFT();
    7471        test.setSize(600, 600);
    7572        test.setVisible(true);
  • trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTestFT.java

    r9543 r9546  
    66import javax.swing.JFrame;
    77
    8 import org.junit.Ignore;
    98import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.data.conflict.Conflict;
     
    1413import org.openstreetmap.josm.data.projection.Projections;
    1514
    16 @Ignore
    17 public class PropertiesMergerTest extends JFrame {
     15public class PropertiesMergerTestFT extends JFrame {
    1816
    1917    private PropertiesMerger merger;
     
    4038     * Constructs a new {@code PropertiesMergerTest}.
    4139     */
    42     public PropertiesMergerTest() {
     40    public PropertiesMergerTestFT() {
    4341        build();
    4442        populate();
     
    4644
    4745    public static void main(String[] args) {
    48         PropertiesMergerTest app = new PropertiesMergerTest();
     46        PropertiesMergerTestFT app = new PropertiesMergerTestFT();
    4947        app.setSize(600, 400);
    5048        app.setVisible(true);
  • trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTestFT.java

    r9543 r9546  
    66import javax.swing.JFrame;
    77
    8 import org.junit.Ignore;
    98import org.openstreetmap.josm.data.conflict.Conflict;
    109import org.openstreetmap.josm.data.osm.Node;
     
    1413import org.openstreetmap.josm.data.osm.Way;
    1514
    16 @Ignore
    17 public class RelationMemberMergerTest extends JFrame {
     15public class RelationMemberMergerTestFT extends JFrame {
    1816
    1917    private RelationMemberMerger merger;
     
    4442     * Constructs a new {@code RelationMemberMergerTest}.
    4543     */
    46     public RelationMemberMergerTest() {
     44    public RelationMemberMergerTestFT() {
    4745        build();
    4846        populate();
     
    5048
    5149    public static void main(String[] args) {
    52         RelationMemberMergerTest test = new RelationMemberMergerTest();
     50        RelationMemberMergerTestFT test = new RelationMemberMergerTestFT();
    5351        test.setSize(600, 600);
    5452        test.setVisible(true);
  • trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTestFT.java

    r9543 r9546  
    66import javax.swing.JFrame;
    77
    8 import org.junit.Ignore;
    9 
    10 @Ignore
    11 public class TagMergerTest extends JFrame {
     8public class TagMergerTestFT extends JFrame {
    129
    1310    private TagMerger tagMerger;
     
    2219     * Constructs a new {@code TagMergerTest}.
    2320     */
    24     public TagMergerTest() {
     21    public TagMergerTestFT() {
    2522        build();
    2623        tagMerger.getModel().addItem(new TagMergeItem("key", "myvalue", "theirvalue"));
     
    3532
    3633    public static void main(String[] args) {
    37         TagMergerTest test  = new TagMergerTest();
     34        TagMergerTestFT test  = new TagMergerTestFT();
    3835        test.setSize(600, 600);
    3936        test.setVisible(true);
  • trunk/test/functional/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialogTestFT.java

    r9543 r9546  
    44import javax.swing.JFrame;
    55
    6 import org.junit.Ignore;
    76import org.openstreetmap.josm.data.conflict.Conflict;
    87import org.openstreetmap.josm.data.osm.Node;
     
    109import org.openstreetmap.josm.data.osm.Way;
    1110
    12 @Ignore
    13 public class ConflictResolutionDialogTest extends JFrame {
     11public class ConflictResolutionDialogTestFT extends JFrame {
    1412
    1513    private ConflictResolutionDialog dialog;
     
    4038     * Constructs a new {@code ConflictResolutionDialogTest}.
    4139     */
    42     public ConflictResolutionDialogTest() {
     40    public ConflictResolutionDialogTestFT() {
    4341        build();
    4442    }
    4543
    4644    public static void main(String[] args) {
    47         ConflictResolutionDialogTest test = new ConflictResolutionDialogTest();
     45        ConflictResolutionDialogTestFT test = new ConflictResolutionDialogTestFT();
    4846        test.setVisible(true);
    4947        test.populate();
  • trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTestFT.java

    r9543 r9546  
    44import javax.swing.JFrame;
    55
    6 import org.junit.Ignore;
    7 
    8 @Ignore
    9 public class ChangesetCacheManagerTest extends JFrame {
     6public class ChangesetCacheManagerTestFT extends JFrame {
    107
    118    private ChangesetCacheManager manager;
     
    1714
    1815    public static void main(String[] args) {
    19         new ChangesetCacheManagerTest().start();
     16        new ChangesetCacheManagerTestFT().start();
    2017    }
    2118}
  • trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialogTestFT.java

    r9543 r9546  
    44import javax.swing.JFrame;
    55
    6 import org.junit.Ignore;
    7 
    8 @Ignore
    9 public class ChangesetQueryDialogTest extends JFrame {
     6public class ChangesetQueryDialogTestFT extends JFrame {
    107
    118    private ChangesetQueryDialog dialog;
     
    1815
    1916    public static void main(String[] args) {
    20         new ChangesetQueryDialogTest().start();
     17        new ChangesetQueryDialogTestFT().start();
    2118    }
    2219}
  • trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTestFT.java

    r9543 r9546  
    1818import org.openstreetmap.josm.io.OsmTransferException;
    1919
    20 @Ignore
    21 public class HistoryBrowserTest extends JFrame {
     20public class HistoryBrowserTestFT extends JFrame {
    2221
    2322    @BeforeClass
     
    5150     * Constructs a new {@code HistoryBrowserTest}.
    5251     */
    53     public HistoryBrowserTest() {
     52    public HistoryBrowserTestFT() {
    5453        build();
    5554        //populate(OsmPrimitiveType.NODE,354117);
     
    6059
    6160    public static void main(String[] args) {
    62         HistoryBrowserTest.init();
    63         new HistoryBrowserTest().setVisible(true);
     61        HistoryBrowserTestFT.init();
     62        new HistoryBrowserTestFT().setVisible(true);
    6463    }
    6564}
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java

    r8857 r9546  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.conflict.nodes;
     2package org.openstreetmap.josm.gui.conflict.pair.nodes;
    33
    44import static org.fest.reflect.core.Reflection.field;
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java

    r8857 r9546  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.conflict.properties;
     2package org.openstreetmap.josm.gui.conflict.pair.properties;
    33
    44import static org.junit.Assert.assertEquals;
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java

    r9543 r9546  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.conflict.tags;
     2package org.openstreetmap.josm.gui.conflict.pair.tags;
    33
    44import static org.junit.Assert.assertEquals;
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java

    r9543 r9546  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.conflict.tags;
     2package org.openstreetmap.josm.gui.conflict.pair.tags;
    33
    44import static org.fest.reflect.core.Reflection.field;
Note: See TracChangeset for help on using the changeset viewer.