ChangelogGeneratorTests Class — spring-boot Architecture
Architecture documentation for the ChangelogGeneratorTests class in ChangelogGeneratorTests.java from the spring-boot codebase.
Entity Profile
Source Code
configuration-metadata/spring-boot-configuration-metadata-changelog-generator/src/test/java/org/springframework/boot/configurationmetadata/changelog/ChangelogGeneratorTests.java lines 38–68
class ChangelogGeneratorTests {
@TempDir
File temp;
@Test
void generateChangeLog() throws IOException {
File oldJars = new File(this.temp, "1.0");
addJar(oldJars, "sample-1.0.json");
File newJars = new File(this.temp, "2.0");
addJar(newJars, "sample-2.0.json");
File out = new File(this.temp, "changes.adoc");
String[] args = new String[] { oldJars.getAbsolutePath(), newJars.getAbsolutePath(), out.getAbsolutePath() };
ChangelogGenerator.main(args);
assertThat(out).usingCharset(StandardCharsets.UTF_8)
.hasSameTextualContentAs(new File("src/test/resources/sample.adoc"));
}
private void addJar(File directory, String filename) throws IOException {
directory.mkdirs();
try (JarOutputStream out = new JarOutputStream(new FileOutputStream(new File(directory, "sample.jar")))) {
out.putNextEntry(new ZipEntry("META-INF/spring-configuration-metadata.json"));
try (InputStream in = new FileInputStream("src/test/resources/" + filename)) {
in.transferTo(out);
out.closeEntry();
}
}
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free