Last change
on this file since 2077 was 2077, checked in by Gubaer, 15 years ago |
Had to replace DataSet:getPrimitiveById(id) with DataSet:getPrimitiveById(id,type). Primitive ids are not globally unique, only per type of primitive.
Fixed problems in unit test, available unit tests passing again.
|
File size:
1.2 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.conflict.pair.properties;
|
---|
3 |
|
---|
4 | import java.awt.BorderLayout;
|
---|
5 |
|
---|
6 | import javax.swing.JFrame;
|
---|
7 |
|
---|
8 | import org.openstreetmap.josm.Main;
|
---|
9 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
10 | import org.openstreetmap.josm.data.osm.Node;
|
---|
11 | import org.openstreetmap.josm.data.projection.Epsg4326;
|
---|
12 | import org.openstreetmap.josm.gui.conflict.pair.properties.PropertiesMerger;
|
---|
13 |
|
---|
14 | public class PropertiesMergerTest extends JFrame{
|
---|
15 |
|
---|
16 | private PropertiesMerger merger;
|
---|
17 |
|
---|
18 | protected void build() {
|
---|
19 | Main.proj = new Epsg4326();
|
---|
20 |
|
---|
21 | setLayout(new BorderLayout());
|
---|
22 | add(merger = new PropertiesMerger(), BorderLayout.CENTER);
|
---|
23 | }
|
---|
24 |
|
---|
25 | protected void populate() {
|
---|
26 | Node my = new Node(1);
|
---|
27 | my.setCoor(new LatLon(1,1));
|
---|
28 | my.setDeleted(true);
|
---|
29 |
|
---|
30 | Node their = new Node(2);
|
---|
31 | their.setCoor(new LatLon(10,10));
|
---|
32 |
|
---|
33 | merger.getModel().populate(my, their);
|
---|
34 | }
|
---|
35 |
|
---|
36 | public PropertiesMergerTest() {
|
---|
37 | build();
|
---|
38 | populate();
|
---|
39 | }
|
---|
40 |
|
---|
41 | static public void main(String args[]) {
|
---|
42 | PropertiesMergerTest app = new PropertiesMergerTest();
|
---|
43 | app.setSize(600, 400);
|
---|
44 | app.setVisible(true);
|
---|
45 | }
|
---|
46 |
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.