Merged in feature/integration_test_v2 (pull request #54)

Integration tests for v2
This commit is contained in:
Sebastian Sdorra
2018-08-07 14:14:43 +00:00
51 changed files with 1234 additions and 4349 deletions

View File

@@ -38,51 +38,11 @@ package sonia.scm.repository;
*
* @since 1.14
*/
public class RepositoryIsNotArchivedException extends RepositoryException
{
public class RepositoryIsNotArchivedException extends RepositoryException {
/** Field description */
private static final long serialVersionUID = 7728748133123987511L;
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
public RepositoryIsNotArchivedException() {}
/**
* Constructs ...
*
*
* @param message
*/
public RepositoryIsNotArchivedException(String message)
{
super(message);
}
/**
* Constructs ...
*
*
* @param cause
*/
public RepositoryIsNotArchivedException(Throwable cause)
{
super(cause);
}
/**
* Constructs ...
*
*
* @param message
* @param cause
*/
public RepositoryIsNotArchivedException(String message, Throwable cause)
{
super(message, cause);
public RepositoryIsNotArchivedException() {
super("Repository could not be deleted, because it is not archived.");
}
}

View File

@@ -41,7 +41,6 @@ import sonia.scm.TypeManager;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Collection;
import java.util.Optional;
//~--- JDK imports ------------------------------------------------------------
@@ -135,11 +134,4 @@ public interface RepositoryManager
*/
@Override
public RepositoryHandler getHandler(String type);
default Optional<Repository> getByNamespace(String namespace, String name) {
return getAll()
.stream()
.filter(r -> r.getName().equals(name) && r.getNamespace().equals(namespace))
.findFirst();
}
}