Ejemplo n.º 1
0
  /** Test method for {@link com.mapper.map.MapNode#addAdjacentMapEdge(com.mapper.map.MapEdge)} . */
  public void testAddAdjacentEdge() {
    GeoPoint rapsonHall = new GeoPoint(ARCH_LAT, ARCH_LONG);
    MapNode rapsonHallNode = new MapNode(51, rapsonHall);

    MapEdge gopherEdge = new MapEdge(5, this.node, rapsonHallNode);
    node.addAdjacentSkywayEdge(gopherEdge);

    List<MapEdge> edges = node.getAdjacentEdges();
    Assert.assertNotNull(edges);
    Assert.assertEquals(1, edges.size());
    Assert.assertEquals(gopherEdge, edges.get(0));
  }
Ejemplo n.º 2
0
 /** Test method for {@link com.mapper.map.MapNode#setNodeId(int)}. */
 public void testSetNodeId() {
   int newNodeId = -40;
   node.setNodeId(newNodeId);
   Assert.assertEquals(newNodeId, node.getNodeId());
 }
Ejemplo n.º 3
0
 /**
  * Test method for {@link com.mapper.map.MapNode#getAdjacentMapEdges()}.
  *
  * <p>Verifies that the skyway edge list, after node initialization, is empty.
  */
 public void testGetAdjacentMapEdges_initialized() {
   List<MapEdge> edges = node.getAdjacentEdges();
   Assert.assertNotNull(edges);
   Assert.assertEquals(0, edges.size());
 }
Ejemplo n.º 4
0
 /**
  * Test method for {@link com.mapper.map.MapNode#getNodeId()}. Tests the constructor and getter.
  */
 public void testGetNodeId() {
   Assert.assertEquals(INIT_NODE_ID, node.getNodeId());
 }