private AnticipatedTransition getAnticipatedTransition(AnticipatedTransitionDto transitionDto) {
return new AnticipatedTransition(
transitionDto.getProjectUuid(),
- "branch",
transitionDto.getUserUuid(),
RuleKey.parse(transitionDto.getRuleKey()),
transitionDto.getMessage(),
}
private Collection<AnticipatedTransition> getAnticipatedTransitions(String projecKey, String fileName) {
- return Stream.of(new AnticipatedTransition(projecKey, null, "admin", RuleKey.parse("repo:id"), "issue message", fileName, 1, "abcdefghi", "wontfix", "doing the transition in an anticipated way")).collect(Collectors.toList());
+ return Stream.of(new AnticipatedTransition(projecKey, "admin", RuleKey.parse("repo:id"), "issue message", fileName, 1, "abcdefghi", "wontfix", "doing the transition in an anticipated way")).collect(Collectors.toList());
}
private Collection<AnticipatedTransition> getAnticipatedTransitionsWithEmptyComment(String projecKey, String fileName) {
- return Stream.of(new AnticipatedTransition(projecKey, null, "admin", RuleKey.parse("repo:id"), "issue message", fileName, 1, "abcdefghi", "wontfix", null)).collect(Collectors.toList());
+ return Stream.of(new AnticipatedTransition(projecKey, "admin", RuleKey.parse("repo:id"), "issue message", fileName, 1, "abcdefghi", "wontfix", null)).collect(Collectors.toList());
}
private Component getComponent(Component.Type type) {
return anticipatedTransitions.stream()
.map(anticipatedTransition -> new AnticipatedTransition(
projectKey,
- "branch",
userUuid,
RuleKey.parse(anticipatedTransition.ruleKey()),
anticipatedTransition.message(),
private AnticipatedTransition populateAnticipatedTransition() {
return new AnticipatedTransition(
PROJECT_KEY,
- "branch",
USER_UUID,
RuleKey.of("repo", "squid:S0001"),
"issueMessage1",
return List.of(
new AnticipatedTransition(
PROJECT_KEY,
- "branch",
USER_UUID,
RuleKey.parse("squid:S0001"),
"issueMessage1",
"comment1"),
new AnticipatedTransition(
PROJECT_KEY,
- "branch",
USER_UUID,
RuleKey.parse("squid:S0002"),
"issueMessage2",
public class AnticipatedTransition implements Trackable {
private final String projectKey;
- private final String branch;
private final String transition;
private final String userUuid;
private final String comment;
public AnticipatedTransition(
String projectKey,
- @Nullable String branch,
String userUuid,
@Nullable RuleKey ruleKey,
@Nullable String message,
String transition,
@Nullable String comment) {
this.projectKey = projectKey;
- this.branch = branch;
this.transition = transition;
this.userUuid = userUuid;
this.comment = comment;
return projectKey;
}
- public String getBranch() {
- return branch;
- }
-
public String getTransition() {
return transition;
}
}
AnticipatedTransition that = (AnticipatedTransition) o;
return Objects.equals(projectKey, that.projectKey)
- && Objects.equals(branch, that.branch)
&& Objects.equals(transition, that.transition)
&& Objects.equals(userUuid, that.userUuid)
&& Objects.equals(comment, that.comment)
private void assertFieldsAreTheSame(AnticipatedTransition anticipatedTransition, AnticipatedTransition anticipatedTransition2) {
Assertions.assertThat(anticipatedTransition.getProjectKey()).isEqualTo(anticipatedTransition2.getProjectKey());
- Assertions.assertThat(anticipatedTransition.getBranch()).isEqualTo(anticipatedTransition2.getBranch());
Assertions.assertThat(anticipatedTransition.getUserUuid()).isEqualTo(anticipatedTransition2.getUserUuid());
Assertions.assertThat(anticipatedTransition.getTransition()).isEqualTo(anticipatedTransition2.getTransition());
Assertions.assertThat(anticipatedTransition.getComment()).isEqualTo(anticipatedTransition2.getComment());
private AnticipatedTransition getAnticipatedTransition() {
return new AnticipatedTransition(
"projectKey",
- "branch",
"userUuid",
RuleKey.parse("rule:key"),
"message",
private AnticipatedTransition getAnticipatedTransition(Integer line, String message, String hash, String ruleKey) {
return new AnticipatedTransition("projectKey",
- null,
"userUuid",
RuleKey.parse(ruleKey),
message,