MCPcopy Create free account
hub / github.com/cschanck/single-file-java / testRecursive

Method testRecursive

src/test/java/org/sfj/DrawDotTest.java:126–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 }
125
126 @Test
127 public void testRecursive() throws IOException {
128 DrawDot dot = new DrawDot("top");
129 dot.root().add(new Node("a"));
130 dot.root().add(new Node("b"));
131 dot.root().add(new Node("c"));
132 dot.root().add(new Connection(new Node("a"), new Node("b")));
133 dot.root().add(new Connection(new Node("b"), new Node("c")));
134 dot.root().add(new Connection(new Node("c"), new Node("b")));
135 dot.root().add(new Connection(new Node("c"), new Node("a")));
136 StringWriter sw = new StringWriter();
137 dot.emit(sw);
138 LineSource left = source(sw.toString());
139 LineSource right = source(DrawDotTest.this.getClass(), "drawdot2.dot");
140 boolean cmp = stringsCompare(left, right, SKIP_BLANK, TRIM_LEADING_AND_TRAILING_WHITESPACE);
141 assertThat(cmp, is(true));
142 }
143
144}

Callers

nothing calls this directly

Calls 6

rootMethod · 0.95
emitMethod · 0.95
sourceMethod · 0.80
stringsCompareMethod · 0.80
addMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected