Changeset 11475 in josm


Ignore:
Timestamp:
2017-01-17T13:50:51+01:00 (4 months ago)
Author:
bastiK
Message:

see #14252 - better wording in validator message

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r11466 r11475  
    237237                            possibleMatchError = TestError.builder(this, Severity.WARNING, WRONG_TYPE)
    238238                                    .message(ROLE_VERIF_PROBLEM_MSG,
    239                                             marktr("Role member does not match expression ''{0}'' in template {1}"),
     239                                            marktr("Role of relation member does not match expression ''{0}'' in template {1}"),
    240240                                            r.memberExpression, rolePreset.name)
    241241                                    .primitives(member.getMember().isUsable() ? member.getMember() : n)
     
    271271            errors.add(TestError.builder(this, Severity.WARNING, WRONG_TYPE)
    272272                    .message(ROLE_VERIF_PROBLEM_MSG,
    273                             marktr("Role member type ''{0}'' does not match accepted list of ''{1}'' in template {2}"),
    274                             member.getType(), typesStr, rolePreset.name)
     273                            marktr("Type ''{0}'' of relation member with role ''{1}'' does not match accepted types ''{2}'' in template {3}"),
     274                            member.getType(), member.getRole(), typesStr, rolePreset.name)
    275275                    .primitives(member.getMember().isUsable() ? member.getMember() : n)
    276276                    .build());
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/RelationCheckerTest.java

    r11468 r11475  
    9898        List<TestError> errors = testRelation(r);
    9999        assertEquals(1, errors.size());
    100         assertEquals("Role member type 'relation' does not match accepted list of 'node/way' in template Turn Restriction",
     100        assertEquals("Type 'relation' of relation member with role 'via' does not match accepted types 'node/way' in template Turn Restriction",
    101101                errors.get(0).getDescription());
    102102    }
     
    135135        List<TestError> errors = testRelation(r);
    136136        assertEquals(1, errors.size());
    137         assertEquals("Role member does not match expression 'power' in template Power Route", errors.get(0).getDescription());
     137        assertEquals("Role of relation member does not match expression 'power' in template Power Route", errors.get(0).getDescription());
    138138    }
    139139
     
    148148        r.addMember(new RelationMember("", createPrimitive("way no-rail-way=yes")));
    149149        assertEquals(1, testRelation(r).size());
    150         assertEquals("Role member does not match expression 'railway' in template Public Transport Route (Rail)",
     150        assertEquals("Role of relation member does not match expression 'railway' in template Public Transport Route (Rail)",
    151151                testRelation(r).get(0).getDescription());
    152152
     
    154154        r.addMember(new RelationMember("stop", createPrimitive("way no-rail-way=yes")));
    155155        assertEquals(1, testRelation(r).size());
    156         assertEquals("Role member type 'way' does not match accepted list of 'node' in template Public Transport Route (Rail)",
     156        assertEquals("Type 'way' of relation member with role 'stop' does not match accepted types 'node' in template Public Transport Route (Rail)",
    157157                testRelation(r).get(0).getDescription());
    158158
     
    160160        r.addMember(new RelationMember("stop", createPrimitive("node public_transport=stop_position bus=yes")));
    161161        assertEquals(1, testRelation(r).size());
    162         assertEquals("Role member does not match expression 'public_transport=stop_position && "+
     162        assertEquals("Role of relation member does not match expression 'public_transport=stop_position && "+
    163163                "(train=yes || subway=yes || monorail=yes || tram=yes || light_rail=yes)' in template Public Transport Route (Rail)",
    164164                testRelation(r).get(0).getDescription());
Note: See TracChangeset for help on using the changeset viewer.