Skip to content

Commit

Permalink
Drop dependency on Commons IOUtils in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Jan 8, 2025
1 parent e7a559d commit a79e865
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.openrewrite.maven;

import org.apache.commons.io.IOUtils;
import org.apache.maven.project.MavenProject;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -24,7 +23,6 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

Expand All @@ -48,13 +46,13 @@ public void execute() {
};

if (!loc.startsWith("http")) {
Files.write(temp.resolve(loc), "rewrite".getBytes(StandardCharsets.UTF_8));
Files.writeString(temp.resolve(loc), "rewrite");
}

AbstractRewriteMojo.Config config = mojo.getConfig();
assertThat(config).isNotNull();
try (InputStream is = config.inputStream) {
assertThat(IOUtils.readLines(is, StandardCharsets.UTF_8)).isNotEmpty();
assertThat(is.readAllBytes()).isNotEmpty();
}
}
}

0 comments on commit a79e865

Please sign in to comment.