()
| 35 | public class DrawDotTest { |
| 36 | |
| 37 | @Test |
| 38 | public void testNodes() { |
| 39 | Node node1 = new Node("a"); |
| 40 | Node node2 = new Node("b"); |
| 41 | Node node3 = new Node("a"); |
| 42 | |
| 43 | assertThat(node1, is(node1)); |
| 44 | assertThat(node1, is(node3)); |
| 45 | assertThat(node1, not(is(node2))); |
| 46 | |
| 47 | node1.color(DrawDot.ColorsSVG.aliceblue) |
| 48 | .shaped(DrawDot.Shapes.ELLIPSE) |
| 49 | .commentBefore("before") |
| 50 | .commentAfter("after") |
| 51 | .style(DrawDot.NodeStyle.bold) |
| 52 | .label("label"); |
| 53 | |
| 54 | assertThat(node1.getAttributes().get("color").value.toString(), is(DrawDot.ColorsSVG.aliceblue.name())); |
| 55 | assertThat(node1.getAttributes().get("shape").value.toString(), is(DrawDot.Shapes.ELLIPSE.name())); |
| 56 | assertThat(node1.getAttributes().get("label").value.toString(), is("label")); |
| 57 | assertThat(node1.getAttributes().get("style").value.toString(), is(DrawDot.NodeStyle.bold.name())); |
| 58 | assertThat(node1.getCommentsBefore().get(0), is("before")); |
| 59 | assertThat(node1.getCommentsAfter().get(0), is("after")); |
| 60 | |
| 61 | node2.style(DrawDot.NodeStyle.diagonals, DrawDot.ColorsSVG.cadetblue, DrawDot.ColorsSVG.antiquewhite).html("<b>test</b>"); |
| 62 | assertThat(node2.getAttributes().get("style").value.toString(), is(DrawDot.NodeStyle.diagonals.name())); |
| 63 | assertThat(node2.getAttributes().get("fillcolor").value.toString(), |
| 64 | is(DrawDot.ColorsSVG.cadetblue + ":" + DrawDot.ColorsSVG.antiquewhite)); |
| 65 | assertThat(node2.getAttributes().get("label").value.toString(), is("<b>test</b>")); |
| 66 | } |
| 67 | |
| 68 | @Test |
| 69 | public void testConnections() { |
nothing calls this directly
no test coverage detected