Skip to content

Commit

Permalink
test logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Dec 22, 2023
1 parent be3bdf7 commit 547024a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.ByteArrayOutputStream;
import java.io.InputStream;
Expand All @@ -19,6 +21,8 @@

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class ArchiveTest {
private static final Logger LOGGER = LoggerFactory.getLogger(ArchiveTest.class);

@Test
void library_is_available() {
assertThat(Archive.isAvailable()).isTrue();
Expand All @@ -37,8 +41,11 @@ void can_get_entries(TestData testData) throws LibArchiveException {
void can_extract(TestData testData) throws Exception {
try (var archive = new Archive(testData.archivePath())) {
List<Path> entries = Files.list(testData.contentPath()).toList();
LOGGER.info("testData content path: {}", testData.contentPath());
entries.forEach(path -> LOGGER.info("disk entry: {}", path.getFileName()));

for (var entry : archive.getEntries()) {
LOGGER.info("archive entry: {}", entry.getName());
var testEntryPath = entries.stream().filter(path -> path.getFileName().toString().equals(entry.getName())).findAny().orElse(null);
assertThat(testEntryPath).isNotNull();

Expand Down

0 comments on commit 547024a

Please sign in to comment.