GraphExportStyles { public static EdgeStyle getEdgeStyle(Dependency rel) { return EDGE_STYLES.getOrDefault(rel.getDependencyType(), DEFAULT_LINE_STYLE); } private  GraphExportStyles(); static EdgeStyle getEdgeStyle(Dependency rel); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static String getId(String classname); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static String getLabel(List<Abbreviation> abbreviations, String name);  }
@Test public void testGetEdgeStyle() { Dependency dep = new Dependency(new Node("n1"), new Node("n2"), DependencyType.CREATE); EdgeStyle edgeStyle = GraphExportStyles.getEdgeStyle(dep); assertThat(edgeStyle, notNullValue()); assertThat(edgeStyle.getColor(), is("#b2182b")); assertThat(edgeStyle.getWidth(), is("3.0")); assertThat(edgeStyle.getLineStyle(), is("line")); }
@Test public void testGetEdgeStyleDefault() { Dependency dep = new Dependency(new Node("n1"), new Node("n2"), DependencyType.CONTAINS); EdgeStyle edgeStyle = GraphExportStyles.getEdgeStyle(dep); assertThat(edgeStyle, notNullValue()); assertThat(edgeStyle.getColor(), is("#67001f")); assertThat(edgeStyle.getWidth(), is("1.0")); assertThat(edgeStyle.getLineStyle(), is("line")); }