Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void testRewriteBasicPomWithEditMode() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -130,7 +130,7 @@ void testRewritePomPluginDependencies() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -161,7 +161,7 @@ void testRewritePomProfile() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,13 @@ protected static Map<String, MavenProject> getProjectsAsMap(List<MavenProject> r
return map;
}

protected boolean comparePomFiles(List<MavenProject> reactorProjects) throws IOException {
return comparePomFiles(reactorProjects, true);
protected void comparePomFiles(List<MavenProject> reactorProjects) throws IOException {
comparePomFiles(reactorProjects, true);
}

protected boolean comparePomFiles(List<MavenProject> reactorProjects, boolean normalizeLineEndings)
protected void comparePomFiles(List<MavenProject> reactorProjects, boolean normalizeLineEndings)
throws IOException {
comparePomFiles(reactorProjects, "", normalizeLineEndings);

// TODO: return void since this is redundant
return true;
}

protected void comparePomFiles(List<MavenProject> reactorProjects, String expectedFileSuffix) throws IOException {
Expand All @@ -279,10 +276,6 @@ protected void comparePomFiles(MavenProject project, String expectedFileSuffix,
comparePomFiles(expectedFile, actualFile, normalizeLineEndings, false);
}

protected void comparePomFiles(File expectedFile, File actualFile) throws IOException {
comparePomFiles(expectedFile, actualFile, true, false);
}

protected void comparePomFiles(
File expectedFile, File actualFile, boolean normalizeLineEndings, boolean ignoreComments)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void testRewriteBasicPom() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -86,7 +86,7 @@ public void testRewriteBasicPomEntities() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -99,7 +99,7 @@ public void testRewriteBasicPomNamespace() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -112,7 +112,7 @@ public void testRewriteBasicPomWithEncoding() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -125,7 +125,7 @@ public void testRewritePomWithParent() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -167,7 +167,7 @@ public void testRewritePomWithReleasedParent() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

protected abstract void mapAlternateNextVersion(ReleaseDescriptorBuilder config, String projectId);
Expand All @@ -182,7 +182,7 @@ public void testRewritePomWithInheritedVersion() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -213,7 +213,7 @@ public void testRewritePomDependencies() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -245,7 +245,7 @@ public void testRewritePomDependenciesDifferentVersion() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -258,7 +258,7 @@ public void testRewriteManagedPomDependencies() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -289,7 +289,7 @@ public void testRewritePomPlugins() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -320,7 +320,7 @@ public void testRewritePomPluginsDifferentVersion() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -333,7 +333,7 @@ public void testRewriteManagedPomPlugins() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -365,7 +365,7 @@ public void testRewritePomReportPlugins() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -397,7 +397,7 @@ public void testRewritePomReportPluginsDifferentVersion() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -410,7 +410,7 @@ public void testRewritePomExtension() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -443,7 +443,7 @@ public void testRewritePomExtensionDifferentVersion() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -456,7 +456,7 @@ public void testRewritePomExtensionUndefinedVersion() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -584,7 +584,7 @@ public void testRewriteWhitespaceAroundValues() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -598,7 +598,7 @@ public void testRewriteCommentsAroundValues() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand All @@ -612,7 +612,7 @@ public void testRewriteCDataAroundValues() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

@Test
Expand Down Expand Up @@ -684,7 +684,7 @@ public void testRewritePomDependenciesWithNamespace() throws Exception {
.execute(
ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

protected abstract List<MavenProject> prepareReactorProjects(String path) throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.junit.jupiter.api.Test;

import static org.codehaus.plexus.testing.PlexusExtension.getTestFile;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -139,7 +138,7 @@ void testFinalName() throws Exception {

phase.execute(ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);

assertTrue(comparePomFiles(reactorProjects));
comparePomFiles(reactorProjects);
}

/*
Expand Down
Loading
Loading