Changeset 14302 in josm for trunk/test/unit/org
- Timestamp:
- 2018-10-06T23:29:06+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java
r10736 r14302 44 44 45 45 private void assertTagCounts(TagCollection collection, int a, int b, int c, int d) { 46 assertEquals(a, collection.getTagOccur ence(tagA));47 assertEquals(b, collection.getTagOccur ence(tagB));48 assertEquals(c, collection.getTagOccur ence(tagC));49 assertEquals(d, collection.getTagOccur ence(tagD));46 assertEquals(a, collection.getTagOccurrence(tagA)); 47 assertEquals(b, collection.getTagOccurrence(tagB)); 48 assertEquals(c, collection.getTagOccurrence(tagC)); 49 assertEquals(d, collection.getTagOccurrence(tagD)); 50 50 } 51 51 … … 92 92 public void testUnionOfAllPrimitivesCollectionOfQextendsTagged() { 93 93 TagCollection c = TagCollection.unionOfAllPrimitives(Arrays.asList(tagA)); 94 assertEquals(1, c.getTagOccur ence(tagA));94 assertEquals(1, c.getTagOccurrence(tagA)); 95 95 96 96 TagCollection d = TagCollection.unionOfAllPrimitives(Arrays.asList(tagA, tagC)); … … 187 187 public void testGetTagCount() { 188 188 TagCollection c = new TagCollection(Arrays.asList(tagA, tagC, tagC)); 189 assertEquals(2, c.getTagOccur ence(tagC));190 assertEquals(0, c.getTagOccur ence(tagB));191 assertEquals(0, c.getTagOccur ence(tagNullKey));192 assertEquals(0, c.getTagOccur ence(tagNullValue));189 assertEquals(2, c.getTagOccurrence(tagC)); 190 assertEquals(0, c.getTagOccurrence(tagB)); 191 assertEquals(0, c.getTagOccurrence(tagNullKey)); 192 assertEquals(0, c.getTagOccurrence(tagNullValue)); 193 193 } 194 194 … … 415 415 TagCollection collection = d.getTagsFor("k"); 416 416 assertTagCounts(collection, 1, 1, 0, 0); 417 assertEquals(1, collection.getTagOccur ence(tagEmpty));417 assertEquals(1, collection.getTagOccurrence(tagEmpty)); 418 418 } 419 419 … … 426 426 TagCollection collection = d.getTagsFor(Arrays.asList("k", "k2")); 427 427 assertTagCounts(collection, 1, 1, 1, 0); 428 assertEquals(1, collection.getTagOccur ence(tagEmpty));428 assertEquals(1, collection.getTagOccurrence(tagEmpty)); 429 429 } 430 430 … … 628 628 TagCollection c = c1.intersect(c2); 629 629 assertEquals(2, c.getKeys().size()); 630 assertEquals(1, c.getTagOccur ence(tagA));631 assertEquals(1, c.getTagOccur ence(tagD));630 assertEquals(1, c.getTagOccurrence(tagA)); 631 assertEquals(1, c.getTagOccurrence(tagD)); 632 632 } 633 633 … … 641 641 TagCollection c = c1.minus(c2); 642 642 assertEquals(2, c.getKeys().size()); 643 assertEquals(1, c.getTagOccur ence(tagC));644 assertEquals(1, c.getTagOccur ence(tagEmpty));643 assertEquals(1, c.getTagOccurrence(tagC)); 644 assertEquals(1, c.getTagOccurrence(tagEmpty)); 645 645 } 646 646 … … 653 653 TagCollection c2 = new TagCollection(Arrays.asList(tagA, tagB, tagD)); 654 654 TagCollection c = c1.union(c2); 655 assertEquals(2, c.getTagOccur ence(tagA));656 assertEquals(1, c.getTagOccur ence(tagB));657 assertEquals(1, c.getTagOccur ence(tagC));658 assertEquals(2, c.getTagOccur ence(tagD));659 assertEquals(1, c.getTagOccur ence(tagEmpty));655 assertEquals(2, c.getTagOccurrence(tagA)); 656 assertEquals(1, c.getTagOccurrence(tagB)); 657 assertEquals(1, c.getTagOccurrence(tagC)); 658 assertEquals(2, c.getTagOccurrence(tagD)); 659 assertEquals(1, c.getTagOccurrence(tagEmpty)); 660 660 } 661 661 … … 669 669 TagCollection c = c1.emptyTagsForKeysMissingIn(c2); 670 670 assertEquals(2, c.getKeys().size()); 671 assertEquals(1, c.getTagOccur ence(new Tag(tagC.getKey(), "")));672 assertEquals(1, c.getTagOccur ence(tagEmpty));671 assertEquals(1, c.getTagOccurrence(new Tag(tagC.getKey(), ""))); 672 assertEquals(1, c.getTagOccurrence(tagEmpty)); 673 673 } 674 674
Note:
See TracChangeset
for help on using the changeset viewer.