Ignore:
Timestamp:
2018-08-05T20:53:19+02:00 (6 years ago)
Author:
Don-vip
Message:

drop FEST library. This project seems to have vanished years ago, and we don't use it a lot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java

    r13765 r14092  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.osm;
     3
     4import static org.openstreetmap.josm.TestUtils.getPrivateField;
    35
    46import java.io.FileInputStream;
     
    1214import java.util.Random;
    1315
    14 import org.fest.reflect.core.Reflection;
    15 import org.fest.reflect.reference.TypeRef;
    1616import org.junit.Assert;
    1717import org.junit.Rule;
     
    3838    public JOSMTestRules test = new JOSMTestRules();
    3939
    40     private void removeAllTest(DataSet ds) {
     40    @SuppressWarnings("unchecked")
     41    private void removeAllTest(DataSet ds) throws ReflectiveOperationException {
    4142        List<Node> allNodes = new ArrayList<>(ds.getNodes());
    4243        List<Way> allWays = new ArrayList<>(ds.getWays());
    4344        List<Relation> allRelations = new ArrayList<>(ds.getRelations());
    4445
    45         QuadBucketPrimitiveStore<Node, Way, Relation> s = Reflection.field("store").ofType(
    46                 new TypeRef<QuadBucketPrimitiveStore<Node, Way, Relation>>() {}).in(ds).get();
    47         QuadBuckets<Node> nodes = Reflection.field("nodes").ofType(new TypeRef<QuadBuckets<Node>>() {}).in(s).get();
    48         QuadBuckets<Way> ways = Reflection.field("ways").ofType(new TypeRef<QuadBuckets<Way>>() {}).in(s).get();
    49         Collection<Relation> relations = Reflection.field("relations").ofType(new TypeRef<Collection<Relation>>() {}).in(s).get();
     46        QuadBucketPrimitiveStore<Node, Way, Relation> s = (QuadBucketPrimitiveStore<Node, Way, Relation>) getPrivateField(ds, "store");
     47        QuadBuckets<Node> nodes = (QuadBuckets<Node>) getPrivateField(s, "nodes");
     48        QuadBuckets<Way> ways = (QuadBuckets<Way>) getPrivateField(s, "ways");
     49        Collection<Relation> relations = (Collection<Relation>) getPrivateField(s, "relations");
    5050
    5151        int expectedCount = allNodes.size();
     
    7777    }
    7878
     79    /**
     80     * Test that all primitives can be removed from the Quad Buckets.
     81     * @throws Exception never
     82     */
    7983    @Test
    8084    public void testRemove() throws Exception {
     
    8690    }
    8791
     92    /**
     93     * Test that all primitives can be removed from the Quad Buckets, even if moved before.
     94     * @throws Exception never
     95     */
    8896    @Test
    8997    public void testMove() throws Exception {
Note: See TracChangeset for help on using the changeset viewer.