Skip to content

Commit

Permalink
Parameter order with default parameters in test
Browse files Browse the repository at this point in the history
  • Loading branch information
bert@transtrend.com committed Jun 9, 2023
1 parent dd2b51f commit d63a2b9
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -616,15 +616,16 @@ final class DependencyUpdatesSpec extends Specification {
given:
def project = singleProject()
addDependenciesTo(project)
addRepositoryTo(project)

when:
def reporter = evaluate(project, 'milestone', null, null, null,null, false, RELEASE_CANDIDATE.id, {config -> config.name.equals("upgradesFound")})
def reporter = evaluate(project, 'milestone', null, 'build', null,null, false, RELEASE_CANDIDATE.id, {config -> config.name.equals("upgradesFound")})
reporter.write()

then:
with(reporter) {
unresolved.isEmpty()
upgradeVersions.isEmpty()
upgradeVersions.size() == 2
upToDateVersions.isEmpty()
downgradeVersions.isEmpty()
undeclared.isEmpty()
Expand All @@ -645,9 +646,9 @@ final class DependencyUpdatesSpec extends Specification {
private static def evaluate(project, revision = 'milestone', outputFormatter = null,
outputDir = 'build', resolutionStrategy = null, reportfileName = null,
checkForGradleUpdate = true, gradleReleaseChannel = RELEASE_CANDIDATE.id,
configurationFilter = {config -> true}) {
configurationFilter = { true }) {
new DependencyUpdates(project, resolutionStrategy, revision, buildOutputFormatter(outputFormatter), outputDir,
reportfileName, checkForGradleUpdate, gradleReleaseChannel, configurationFilter).run()
reportfileName, checkForGradleUpdate, gradleReleaseChannel, false, false, configurationFilter).run()
}

private static OutputFormatterArgument buildOutputFormatter(outputFormatter) {
Expand Down

0 comments on commit d63a2b9

Please sign in to comment.