@Test void testSortFileEntries() { List<FileEntry> randomSortedFileEntries = createFileEntriesFromFile(RANDOM_SORTED_ENTRIES); List<FileEntry> expectedFileEntries = createFileEntriesFromFile(EXPECTED_FILE_ENTRIES); List<FileEntry> sortedFileEntries = archiveMerger.sort(randomSortedFileEntries); Assertions.assertIterableEquals(getFileEntriesNames(expectedFileEntries), getFileEntriesNames(sortedFileEntries)); }
List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<FileEntry> archiveParts); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<FileEntry> archiveParts);  }