Ignore:
Timestamp:
2016-07-08T15:30:53+02:00 (8 years ago)
Author:
darya
Message:

Checks for adjacent ways

Location:
applications/editors/josm/plugins/pt_assistant/test
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/AbstractTest.java

    r32299 r32603  
    4040 public static final String PATH_TO_ROAD_TYPE_ERROR = "test/data/road-type.osm";
    4141 
     42 public static final String PATH_TO_ONEWAY_BAD_MEMBER_SORTING = "test/data/oneway-bad-member-sorting.osm";
    4243 
     44 public static final String PATH_TO_ONEWAY_WRONG_DIRECTION = "test/data/oneway-wrong-direction.osm";
     45 public static final String PATH_TO_ONEWAY_WRONG_DIRECTION2 = "test/data/oneway-wrong-direction2.osm";
     46
    4347  /**
    4448   * Initiates the basic parts of JOSM.
  • applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/validation/DirecionTestTest.java

    r32582 r32603  
    1919   
    2020    @Test
    21     public void test() {
     21    public void testOnewayTrue() {
    2222       
    23         File file = new File(AbstractTest.PATH_TO_ROUNDABOUT_ONEWAY);
     23        File file = new File(AbstractTest.PATH_TO_ONEWAY_WRONG_DIRECTION);
    2424        DataSet ds = ImportUtils.importOsmFile(file, "testLayer");
    2525       
     
    3333        }
    3434       
    35         assertEquals(route.getMembersCount(), 213);
    36                
     35             
    3736        List<TestError> errors = new ArrayList<>();
    3837       
     
    4342        }
    4443       
    45         assertEquals(errors.size(), 1);
     44        assertEquals(errors.size(), 2);
    4645        int onewayErrorCaught = 0;
    4746        for (TestError e: errors ) {
     
    5150        }
    5251       
    53         assertEquals(onewayErrorCaught, 1);
     52        assertEquals(onewayErrorCaught, 2);
    5453       
    5554        // fix the direction errors:
     
    6059                @SuppressWarnings("unchecked")
    6160                List<OsmPrimitive> highlighted = (List<OsmPrimitive>) e.getHighlighted();
    62                 if (highlighted.get(0).getId() != 26130630 && highlighted.get(0).getId() != 151278290)  {
     61                if (highlighted.get(0).getId() != 225732678 && highlighted.get(0).getId() != 24215210)  {
    6362                    detectedErrorsAreCorrect = false;
    6463                }
Note: See TracChangeset for help on using the changeset viewer.