mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-01 03:32:29 +00:00
Remove commons-lang3 test dependency.
This commit is contained in:
parent
de5ed44c97
commit
eeae6dd731
6
pom.xml
6
pom.xml
@ -76,12 +76,6 @@
|
|||||||
<artifactId>ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>1.10.9</version>
|
<version>1.10.9</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-lang3</artifactId>
|
|
||||||
<version>3.12.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.assertj</groupId>
|
<groupId>org.assertj</groupId>
|
||||||
|
@ -3,15 +3,16 @@ package net.sourceforge.plantuml;
|
|||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import static net.sourceforge.plantuml.test.TestUtils.writeUtf8File;
|
import static net.sourceforge.plantuml.test.TestUtils.writeUtf8File;
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.assertj.core.util.Lists.newArrayList;
|
||||||
|
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
@ -48,7 +49,6 @@ public class TestFileDirOption {
|
|||||||
assertThat(output).contains("included-ok");
|
assertThat(output).contains("included-ok");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_pipe_without_filedir_cannot_find_include() throws Exception {
|
public void test_pipe_without_filedir_cannot_find_include() throws Exception {
|
||||||
|
|
||||||
@ -80,7 +80,9 @@ public class TestFileDirOption {
|
|||||||
|
|
||||||
private String[] optionArray(String... extraOptions) {
|
private String[] optionArray(String... extraOptions) {
|
||||||
|
|
||||||
return ArrayUtils.addAll(COMMON_OPTIONS, extraOptions);
|
final List<String> list = newArrayList(COMMON_OPTIONS);
|
||||||
|
Collections.addAll(list, extraOptions);
|
||||||
|
return list.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String renderViaPicoWeb(String... extraOptions) throws Exception {
|
private String renderViaPicoWeb(String... extraOptions) throws Exception {
|
||||||
@ -95,7 +97,7 @@ public class TestFileDirOption {
|
|||||||
|
|
||||||
final String httpResponse = new String(baos.toByteArray(), UTF_8);
|
final String httpResponse = new String(baos.toByteArray(), UTF_8);
|
||||||
|
|
||||||
return StringUtils.substringAfter(httpResponse, "\n\r\n");
|
return httpResponse.substring(httpResponse.indexOf("\n\r\n") + 3); // return just the HTTP body
|
||||||
}
|
}
|
||||||
|
|
||||||
private String renderViaPipe(String... extraOptions) throws Exception {
|
private String renderViaPipe(String... extraOptions) throws Exception {
|
||||||
|
Loading…
Reference in New Issue
Block a user