#145 - Migrate unit tests to JUnit 5 and AssertJ.
This commit is contained in:
@@ -119,10 +119,9 @@ class GitCommands extends TimedCommand {
|
||||
public void backportChangelogs(@CliOption(key = "", mandatory = true) TrainIteration iteration, //
|
||||
@CliOption(key = "target") String trains) {
|
||||
|
||||
List<Train> targets = trains == null ? Collections.emptyList()
|
||||
: Stream.of(trains.split(",")).//
|
||||
map(it -> ReleaseTrains.getTrainByName(it)).//
|
||||
collect(Collectors.toList());
|
||||
List<Train> targets = trains == null ? Collections.emptyList() : Stream.of(trains.split(",")).//
|
||||
map(it -> ReleaseTrains.getTrainByName(it)).//
|
||||
collect(Collectors.toList());
|
||||
|
||||
git.backportChangelogs(iteration, targets);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Tickets implements Streamable<Ticket> {
|
||||
public Ticket getReleaseTicket(ModuleIteration moduleIteration) {
|
||||
|
||||
return findReleaseTicket(moduleIteration).orElseThrow(
|
||||
() -> new IllegalStateException(String.format("Did not find a release ticket for %s!", moduleIteration)));
|
||||
() -> new IllegalArgumentException(String.format("Did not find a release ticket for %s!", moduleIteration)));
|
||||
}
|
||||
|
||||
public Tickets getIssueTickets(ModuleIteration moduleIteration) {
|
||||
|
||||
@@ -530,7 +530,7 @@ class GitHub implements IssueTracker {
|
||||
Optional<Milestone> milestone = findMilestone(moduleIteration, repositoryName);
|
||||
|
||||
return milestone
|
||||
.orElseThrow(() -> new IllegalStateException(String.format("No milestone for %s found containing %s!", //
|
||||
.orElseThrow(() -> new IllegalArgumentException(String.format("No milestone for %s found containing %s!", //
|
||||
moduleIteration.getProject().getFullName(), //
|
||||
moduleIteration.getShortVersionString())));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user