Skip to content

Commit

Permalink
WIP - test towards jrtom#169
Browse files Browse the repository at this point in the history
  • Loading branch information
jbduncan committed Dec 26, 2017
1 parent 4ab487e commit b1c0b4f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jung-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<artifactId>truth</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth.extensions</groupId>
<artifactId>truth-java8-extension</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

// TODO: Test CTree#root, CTree#depth and CTree#height
Expand Down Expand Up @@ -428,6 +429,14 @@ public void addEdge_existingEdgeBetweenSameNodes() {
assertThat(putEdge(N1, N2)).isFalse();
}

@Ignore("Enable if https://github.com/jrtom/jung/issues/169 is accepted, otherwise remove")
@Test
public void addEdge_rootChangedIndirectly() {
putEdge(N1, N2); // N1 is set as the root initially
putEdge(N3, N1); // But now N3 should be the new root
Truth8.assertThat(tree.root()).hasValue(N3);
}

@Test
public void removeEdge_antiparallelEdges() {
putEdge(N1, N2);
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<artifactId>truth</artifactId>
<version>${truth.version}</version>
</dependency>
<dependency>
<groupId>com.google.truth.extensions</groupId>
<artifactId>truth-java8-extension</artifactId>
<version>${truth.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
Expand Down

0 comments on commit b1c0b4f

Please sign in to comment.