source: josm/trunk/test/functional/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialogTestFT.java@ 17275

Last change on this file since 17275 was 17275, checked in by Don-vip, 3 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.dialogs;
3
4import javax.swing.JFrame;
5
6import org.openstreetmap.josm.data.conflict.Conflict;
7import org.openstreetmap.josm.data.osm.Node;
8import org.openstreetmap.josm.data.osm.OsmPrimitive;
9import org.openstreetmap.josm.data.osm.Way;
10
11class ConflictResolutionDialogTestFT extends JFrame {
12
13 private ConflictResolutionDialog dialog;
14
15 protected void build() {
16 setSize(100, 100);
17 dialog = new ConflictResolutionDialog(this);
18 dialog.setSize(600, 600);
19 }
20
21 protected void populate() {
22 Way w1 = new Way(1);
23 w1.addNode(new Node(10));
24 w1.addNode(new Node(11));
25
26 Way w2 = new Way(1);
27 w2.addNode(new Node(10));
28 w2.addNode(new Node(11));
29
30 dialog.getConflictResolver().populate(new Conflict<OsmPrimitive>(w1, w2));
31 }
32
33 public void showDialog() {
34 dialog.showDialog();
35 }
36
37 /**
38 * Constructs a new {@code ConflictResolutionDialogTest}.
39 */
40 ConflictResolutionDialogTestFT() {
41 build();
42 }
43
44 public static void main(String[] args) {
45 ConflictResolutionDialogTestFT test = new ConflictResolutionDialogTestFT();
46 test.setVisible(true);
47 test.populate();
48 test.showDialog();
49 }
50}
Note: See TracBrowser for help on using the repository browser.