mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
fixed returning null for getScmRepository from SimpleSvnWorkDirFactory
This commit is contained in:
@@ -72,7 +72,7 @@ public class AbstractSvnCommandTestBase extends ZippedRepositoryTestBase
|
||||
{
|
||||
if (context == null)
|
||||
{
|
||||
context = new SvnContext(repositoryDirectory);
|
||||
context = new SvnContext(repository, repositoryDirectory);
|
||||
}
|
||||
|
||||
return context;
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.util.WorkdirProvider;
|
||||
import sonia.scm.repository.util.WorkingCopy;
|
||||
|
||||
@@ -66,4 +67,11 @@ public class SimpleSvnWorkDirFactoryTest extends AbstractSvnCommandTestBase {
|
||||
assertThat(directory).doesNotExist();
|
||||
assertThat(workingRepository).doesNotExist();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldReturnRepository() {
|
||||
SimpleSvnWorkDirFactory factory = new SimpleSvnWorkDirFactory(workdirProvider);
|
||||
Repository scmRepository = factory.getScmRepository(createContext());
|
||||
assertThat(scmRepository).isSameAs(repository);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,6 @@ public class SvnUnbundleCommandTest extends AbstractSvnCommandTestBase
|
||||
|
||||
SVNRepositoryFactory.createLocalRepository(folder, true, true);
|
||||
|
||||
return new SvnContext(folder);
|
||||
return new SvnContext(repository, folder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user