Skip to content

Commit

Permalink
formatter:format
Browse files Browse the repository at this point in the history
  • Loading branch information
mstahv committed Jan 2, 2023
1 parent 95e3619 commit 48bf7b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions flow-server/src/main/java/com/vaadin/flow/component/Svg.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public Svg(InputStream stream) {
}

/**
* Creates an instance based on the given SVG string. The string must
* have exactly one root element.
* Creates an instance based on the given SVG string. The string must have
* exactly one root element.
*
* @param svg
* the SVG to display
Expand Down
13 changes: 4 additions & 9 deletions flow-server/src/test/java/com/vaadin/flow/component/SvgTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public void attachedToElement() {
new Svg("<svg></svg>").getParent();
}


@Test(expected = IllegalArgumentException.class)
public void nullStream() {
new Svg((InputStream) null);
Expand Down Expand Up @@ -68,8 +67,7 @@ public void text() {
@Test
public void simpleSvg() {
Svg svg = new Svg(TRIVIAL_SVG);
Assert.assertEquals(TRIVIAL_SVG,
getSvgDocumentBody(svg));
Assert.assertEquals(TRIVIAL_SVG, getSvgDocumentBody(svg));
}

@Test
Expand All @@ -81,18 +79,15 @@ public void withDocType() {
@Test
public void resetSvg() {
Svg svg = new Svg(TRIVIAL_SVG);
Assert.assertEquals(TRIVIAL_SVG,
getSvgDocumentBody(svg));
Assert.assertEquals(TRIVIAL_SVG, getSvgDocumentBody(svg));
svg.setSvg(TRIVIAL_SVG2);
Assert.assertEquals(TRIVIAL_SVG2,
getSvgDocumentBody(svg));
Assert.assertEquals(TRIVIAL_SVG2, getSvgDocumentBody(svg));
}

@Test
public void fromStream() {
Svg svg = new Svg(new ByteArrayInputStream(TRIVIAL_SVG.getBytes()));
Assert.assertEquals(TRIVIAL_SVG,
getSvgDocumentBody(svg));
Assert.assertEquals(TRIVIAL_SVG, getSvgDocumentBody(svg));
}

private static String getSvgDocumentBody(Svg svg) {
Expand Down

0 comments on commit 48bf7b0

Please sign in to comment.