Package org.sonar.graph

Examples of org.sonar.graph.StringEdge


    assertThat(graph.getOutgoingEdges("D").iterator().next().getWeight(), is(4));
  }

  @Test
  public void testGetOutgoingEdges() {
    assertThat(graph.getOutgoingEdges("A"), hasItem(new StringEdge("A", "B")));
    assertThat(graph.getOutgoingEdges("A").size(), is(2));
    assertThat(graph.getOutgoingEdges("B"), hasItem(new StringEdge("B", "C")));
  }
View Full Code Here


    assertThat(graph.getOutgoingEdges("B"), hasItem(new StringEdge("B", "C")));
  }

  @Test
  public void testGetIncomingEdges() {
    assertThat(graph.getIncomingEdges("C"), hasItem(new StringEdge("A", "C")));
    assertThat(graph.getIncomingEdges("A").size(), is(0));
  }
View Full Code Here

    assertThat(graph.getIncomingEdges("A").size(), is(0));
  }

  @Test
  public void testGetEdges() {
    assertTrue(graph.getEdges(Arrays.asList("A")).containsAll(Arrays.asList(new StringEdge("A", "B"), new StringEdge("A", "C"))));
    assertTrue(graph.getEdges(Arrays.asList("A", "B")).containsAll(Arrays.asList(new StringEdge("A", "B"), new StringEdge("A", "C"), new StringEdge("B", "C"))));
  }
View Full Code Here

TOP

Related Classes of org.sonar.graph.StringEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.