Changeset 8391 in josm for trunk


Ignore:
Timestamp:
2015-05-18T02:30:54+02:00 (4 years ago)
Author:
Don-vip
Message:

fix unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/gui/conflict
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java

    r7937 r8391  
    1313import java.util.Arrays;
    1414import java.util.List;
     15import java.util.Set;
    1516
    1617import javax.swing.DefaultListSelectionModel;
     
    655656        model.addPropertyChangeListener(listener);
    656657
    657         List<PropertyChangeListener> listeners = field("listeners")
    658         .ofType(List.class)
     658        Set<PropertyChangeListener> listeners = field("listeners")
     659        .ofType(Set.class)
    659660        .in(model)
    660661        .get();
    661662
    662663        assertEquals(1, listeners.size());
    663         assertEquals(listener, listeners.get(0));
     664        assertEquals(listener, listeners.iterator().next());
    664665    }
    665666
     
    678679        model.removePropertyChangeListener(listener);
    679680
    680         List<PropertyChangeListener> listeners = field("listeners")
    681         .ofType(List.class)
     681        Set<PropertyChangeListener> listeners = field("listeners")
     682        .ofType(Set.class)
    682683        .in(model)
    683684        .get();
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeModelTest.java

    r7937 r8391  
    99import java.beans.PropertyChangeListener;
    1010import java.util.List;
     11import java.util.Set;
    1112
    1213import org.junit.BeforeClass;
     
    3637        model.addPropertyChangeListener(listener);
    3738
    38         List<?> list = field("listeners").ofType(List.class)
    39         .in(model)
    40         .get();
    41 
    42         assertEquals(1, list.size());
    43         assertEquals(listener, list.get(0));
     39        Set<?> list = field("listeners").ofType(Set.class)
     40        .in(model)
     41        .get();
     42
     43        assertEquals(1, list.size());
     44        assertEquals(listener, list.iterator().next());
    4445    }
    4546
     
    5556        model.removePropertyChangeListener(listener);
    5657
    57         List<?> list = field("listeners")
    58         .ofType(List.class)
     58        Set<?> list = field("listeners")
     59        .ofType(Set.class)
    5960        .in(model)
    6061        .get();
Note: See TracChangeset for help on using the changeset viewer.