1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-01 09:14:01 +00:00

Merge pull request #1686 from The-Lum/PatchBranch

refactor: Create `test/utils` directory and `CommandHelpThemeTest` on a more accurate folder
This commit is contained in:
PlantUML 2024-02-13 17:41:13 +01:00 committed by GitHub
commit 17d317e53a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 43 additions and 20 deletions

View File

@ -1,9 +1,9 @@
package net.sourceforge.plantuml; 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 org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.util.Lists.newArrayList; import static org.assertj.core.util.Lists.newArrayList;
import static test.utils.TestUtils.writeUtf8File;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;

View File

@ -1,9 +1,9 @@
package net.sourceforge.plantuml; 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 org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.util.Lists.newArrayList; import static org.assertj.core.util.Lists.newArrayList;
import static test.utils.TestUtils.writeUtf8File;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;

View File

@ -0,0 +1,23 @@
package net.sourceforge.plantuml.help;
import static org.assertj.core.api.Assertions.assertThat;
import static test.utils.PlantUmlTestUtils.exportDiagram;
import org.junit.jupiter.api.Test;
class CommandHelpThemeTest {
@Test
public void command_help_theme() throws Exception {
final String output = exportDiagram(
"@startuml",
"help themes",
"@enduml"
).asString();
assertThat(output)
.startsWith(" \nHelp on themes")
.contains("bluegray", "hacker");
}
}

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,8 +1,8 @@
package net.sourceforge.plantuml.tim.stdlib; package net.sourceforge.plantuml.tim.stdlib;
import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput;
import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput;
import static test.utils.JunitUtils.StringJsonConverter;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

View File

@ -1,11 +1,11 @@
package testhelper; package test.example;
import static net.sourceforge.plantuml.test.PlantUmlTestUtils.exportDiagram; import static test.utils.PlantUmlTestUtils.exportDiagram;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
class TestHelper { class TestExample {
@Test @Test
public void test_help_themes() throws Exception { public void test_help_themes() throws Exception {

View File

@ -1,4 +1,4 @@
package net.sourceforge.plantuml.test; package test.utils;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -1,9 +1,9 @@
package net.sourceforge.plantuml.test; package test.utils;
import static net.sourceforge.plantuml.test.ImageTestUtils.assertImageSizeEqual;
import static net.sourceforge.plantuml.test.ImageTestUtils.assertImagesEqual;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail; import static org.assertj.core.api.Assertions.fail;
import static test.utils.ImageTestUtils.assertImageSizeEqual;
import static test.utils.ImageTestUtils.assertImagesEqual;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;

View File

@ -1,4 +1,4 @@
package net.sourceforge.plantuml.test; package test.utils;
import org.junit.jupiter.params.converter.ArgumentConversionException; import org.junit.jupiter.params.converter.ArgumentConversionException;
import org.junit.jupiter.params.converter.SimpleArgumentConverter; import org.junit.jupiter.params.converter.SimpleArgumentConverter;

View File

@ -1,4 +1,4 @@
package net.sourceforge.plantuml.test; package test.utils;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -1,4 +1,4 @@
package net.sourceforge.plantuml.test; package test.utils;
import static java.util.Objects.requireNonNull; import static java.util.Objects.requireNonNull;

View File

@ -1,4 +1,4 @@
package net.sourceforge.plantuml.test; package test.utils;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;