mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 18:51:10 +01:00
implemented rest endpoint for repository types
This commit is contained in:
@@ -32,6 +32,7 @@ package sonia.scm.repository;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.inject.Provider;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
@@ -109,7 +110,7 @@ public class DefaultRepositoryManagerPerfTest {
|
||||
*/
|
||||
@Before
|
||||
public void setUpObjectUnderTest(){
|
||||
when(repositoryHandler.getType()).thenReturn(new Type(REPOSITORY_TYPE, REPOSITORY_TYPE));
|
||||
when(repositoryHandler.getType()).thenReturn(new RepositoryType(REPOSITORY_TYPE, REPOSITORY_TYPE, Sets.newHashSet()));
|
||||
Set<RepositoryHandler> handlerSet = ImmutableSet.of(repositoryHandler);
|
||||
RepositoryMatcher repositoryMatcher = new RepositoryMatcher(Collections.<RepositoryPathMatcher>emptySet());
|
||||
NamespaceStrategy namespaceStrategy = mock(NamespaceStrategy.class);
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.github.legman.Subscribe;
|
||||
import com.github.sdorra.shiro.ShiroRule;
|
||||
import com.github.sdorra.shiro.SubjectAware;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.shiro.authz.UnauthorizedException;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -482,14 +483,14 @@ public class DefaultRepositoryManagerTest extends ManagerTestBase<Repository, Re
|
||||
handlerSet.add(new DummyRepositoryHandler(factory));
|
||||
handlerSet.add(new DummyRepositoryHandler(factory) {
|
||||
@Override
|
||||
public Type getType() {
|
||||
return new Type("hg", "Mercurial");
|
||||
public RepositoryType getType() {
|
||||
return new RepositoryType("hg", "Mercurial", Sets.newHashSet());
|
||||
}
|
||||
});
|
||||
handlerSet.add(new DummyRepositoryHandler(factory) {
|
||||
@Override
|
||||
public Type getType() {
|
||||
return new Type("git", "Git");
|
||||
public RepositoryType getType() {
|
||||
return new RepositoryType("git", "Git", Sets.newHashSet());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user