fix unit test

This commit is contained in:
Eduard Heimbuch
2020-09-21 14:06:18 +02:00
parent 1cad9c3fbc
commit bef11e9f70
2 changed files with 6 additions and 11 deletions

View File

@@ -25,23 +25,17 @@
package sonia.scm.repository.api;
public enum MergeStrategy {
MERGE_COMMIT("merge commit", true),
FAST_FORWARD_IF_POSSIBLE("fast forward if possible", false),
SQUASH("squash", true),
REBASE("rebase", false);
MERGE_COMMIT(true),
FAST_FORWARD_IF_POSSIBLE(true),
SQUASH(true),
REBASE(false);
private final String name;
private final boolean commitMessageAllowed;
MergeStrategy(String name, boolean commitMessageAllowed) {
this.name = name;
MergeStrategy(boolean commitMessageAllowed) {
this.commitMessageAllowed = commitMessageAllowed;
}
public String getName() {
return name;
}
public boolean isCommitMessageAllowed() {
return commitMessageAllowed;
}

View File

@@ -132,6 +132,7 @@ class IndexDtoGeneratorTest {
when(resourceLinks.repositoryTypeCollection()).thenReturn(new ResourceLinks.RepositoryTypeCollectionLinks(scmPathInfo));
when(resourceLinks.repositoryRoleCollection()).thenReturn(new ResourceLinks.RepositoryRoleCollectionLinks(scmPathInfo));
when(resourceLinks.namespaceStrategies()).thenReturn(new ResourceLinks.NamespaceStrategiesLinks(scmPathInfo));
when(resourceLinks.namespaceCollection()).thenReturn(new ResourceLinks.NamespaceCollectionLinks(scmPathInfo));
when(resourceLinks.me()).thenReturn(new ResourceLinks.MeLinks(scmPathInfo, new ResourceLinks.UserLinks(scmPathInfo)));
}
}