Skip to content

Commit e309f04

Browse files
committed
fix tests
1 parent 5ca3b07 commit e309f04

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

graphviz-java/src/main/java/guru/nidi/graphviz/attribute/Attributes.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
import java.util.List;
1919

20+
import static java.util.Arrays.asList;
21+
2022
public interface Attributes<F extends For> {
2123
Attributes<? super F> applyTo(MapAttributes<? super F> attrs);
2224

@@ -43,11 +45,7 @@ static <F extends For> Attributes<F> attrs() {
4345

4446
@SafeVarargs
4547
static <F extends For> Attributes<F> attrs(Attributes<? extends F>... attributes) {
46-
final MapAttributes<F> res = new MapAttributes<>();
47-
for (Attributes<? extends F> attribute : attributes) {
48-
attribute.applyTo(res);
49-
}
50-
return res;
48+
return attrs(asList(attributes));
5149
}
5250

5351
static <F extends For> Attributes<F> attrs(List<Attributes<? extends F>> attributes) {

graphviz-java/src/main/java/guru/nidi/graphviz/model/MutableGraph.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import javax.annotation.Nullable;
2121
import java.util.*;
2222

23+
import static java.util.Arrays.asList;
24+
2325
public class MutableGraph implements LinkSource, LinkTarget {
2426
protected boolean strict;
2527
protected boolean directed;
@@ -89,10 +91,7 @@ public MutableGraph setName(String name) {
8991
}
9092

9193
public MutableGraph add(LinkSource... sources) {
92-
for (final LinkSource source : sources) {
93-
add(source);
94-
}
95-
return this;
94+
return add(asList(sources));
9695
}
9796

9897
public MutableGraph add(List<? extends LinkSource> sources) {

graphviz-java/src/test/java/guru/nidi/graphviz/CodeAnalysisTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@
3737

3838
class CodeAnalysisTest extends CodeAssertJunit5Test {
3939

40-
//TODO un-overwrite as soon as svg salamander is available from maven
41-
@Override
42-
protected EnumSet<CodeAssertTestType> defaultTests() {
43-
final EnumSet<CodeAssertTestType> types = super.defaultTests();
44-
types.remove(CodeAssertTestType.CIRCULAR_DEPENDENCIES);
45-
return types;
46-
}
47-
4840
@Test
4941
void dependencies() {
5042
assertThat(dependencyResult(), matchesRulesExactly());

0 commit comments

Comments
 (0)