Skip to content

Commit

Permalink
reduce usage of Guava
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Jan 10, 2024
1 parent b9dc6e2 commit 4530ba7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import com.google.common.collect.ImmutableList;

import io.wcm.devops.conga.generator.spi.FileHeaderPlugin;
import io.wcm.devops.conga.generator.spi.context.FileContext;
import io.wcm.devops.conga.generator.spi.context.FileHeaderContext;
Expand All @@ -55,7 +53,7 @@ void testApply() throws Exception {
File file = new File("target/generation-test/fileHeader.config");
FileUtils.write(file, "myscript", StandardCharsets.UTF_8);

List<String> lines = ImmutableList.of("**********", "", "Der Jodelkaiser", "aus dem Oetztal", "ist wieder daheim.", "**********");
List<String> lines = List.of("**********", "", "Der Jodelkaiser", "aus dem Oetztal", "ist wieder daheim.", "**********");
FileHeaderContext context = new FileHeaderContext().commentLines(lines);

FileContext fileContext = new FileContext().file(file);
Expand All @@ -66,7 +64,7 @@ void testApply() throws Exception {
"# Der Jodelkaiser aus dem Oetztal ist wieder daheim."));

FileHeaderContext extractContext = underTest.extract(fileContext);
assertEquals(ImmutableList.of("Der Jodelkaiser aus dem Oetztal ist wieder daheim."), extractContext.getCommentLines());
assertEquals(List.of("Der Jodelkaiser aus dem Oetztal ist wieder daheim."), extractContext.getCommentLines());

file.delete();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import com.google.common.collect.ImmutableList;

import io.wcm.devops.conga.generator.spi.FileHeaderPlugin;
import io.wcm.devops.conga.generator.spi.context.FileContext;
import io.wcm.devops.conga.generator.spi.context.FileHeaderContext;
Expand All @@ -52,7 +50,7 @@ void testApply() throws Exception {
File file = new File("target/generation-test/fileHeader.txt");
FileUtils.copyFile(new File(getClass().getResource("/provisioning/validProvisioning.txt").toURI()), file);

List<String> lines = ImmutableList.of("Der Jodelkaiser", "aus dem Oetztal", "ist wieder daheim.");
List<String> lines = List.of("Der Jodelkaiser", "aus dem Oetztal", "ist wieder daheim.");
FileHeaderContext context = new FileHeaderContext().commentLines(lines);
FileContext fileContext = new FileContext().file(file);

Expand Down

0 comments on commit 4530ba7

Please sign in to comment.