mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
Use default implementation to keep compatibility
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -68,7 +68,7 @@ class NamespaceStrategyResourceTest {
|
||||
}
|
||||
|
||||
private Set<NamespaceStrategy> allStrategies() {
|
||||
return strategies(new AwesomeNamespaceStrategy(), new SuperNamespaceStrategy(), new MegaNamespaceStrategy());
|
||||
return strategies(new AwesomeNamespaceStrategy(), new SuperNamespaceStrategy(), new MegaNamespaceStrategy());
|
||||
}
|
||||
|
||||
private Set<NamespaceStrategy> strategies(NamespaceStrategy... strategies) {
|
||||
@@ -80,11 +80,6 @@ class NamespaceStrategyResourceTest {
|
||||
public String createNamespace(Repository repository) {
|
||||
return "awesome";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static class SuperNamespaceStrategy implements NamespaceStrategy {
|
||||
@@ -92,11 +87,6 @@ class NamespaceStrategyResourceTest {
|
||||
public String createNamespace(Repository repository) {
|
||||
return "super";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static class MegaNamespaceStrategy implements NamespaceStrategy {
|
||||
@@ -104,10 +94,5 @@ class NamespaceStrategyResourceTest {
|
||||
public String createNamespace(Repository repository) {
|
||||
return "mega";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -66,17 +66,12 @@ class NamespaceStrategyProviderTest {
|
||||
return new LinkedHashSet<>(Arrays.asList(new Trillian(), new Zaphod(), new Arthur()));
|
||||
}
|
||||
|
||||
private static class Trillian implements NamespaceStrategy {
|
||||
private static class Trillian implements NamespaceStrategy{
|
||||
|
||||
@Override
|
||||
public String createNamespace(Repository repository) {
|
||||
return "trillian";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Zaphod implements NamespaceStrategy {
|
||||
@@ -85,11 +80,6 @@ class NamespaceStrategyProviderTest {
|
||||
public String createNamespace(Repository repository) {
|
||||
return "zaphod";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Arthur implements NamespaceStrategy {
|
||||
@@ -98,11 +88,6 @@ class NamespaceStrategyProviderTest {
|
||||
public String createNamespace(Repository repository) {
|
||||
return "arthur";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -30,7 +30,7 @@ import sonia.scm.ScmConstraintViolationException;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class NamespaceStrategyValidatorTest {
|
||||
|
||||
@@ -52,11 +52,6 @@ class NamespaceStrategyValidatorTest {
|
||||
public String createNamespace(Repository repository) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeChanged() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user