Make type optional

This commit is contained in:
René Pfeuffer
2018-12-03 16:30:19 +01:00
parent 923cd75ff1
commit 33f3216164
21 changed files with 70 additions and 79 deletions

View File

@@ -76,7 +76,7 @@ public class LfsBlobStoreFactory {
*/
@SuppressWarnings("unchecked")
public BlobStore getLfsBlobStore(Repository repository) {
return blobStoreFactory.forType(String.class)
return blobStoreFactory
.withName(repository.getId() + GIT_LFS_REPOSITORY_POSTFIX)
.forRepository(repository)
.build();

View File

@@ -86,7 +86,7 @@ public class GitRepositoryHandlerTest extends SimpleRepositoryHandlerTestBase {
@Before
public void initFactory() {
when(factory.forType(any())).thenCallRealMethod();
when(factory.withName(any())).thenCallRealMethod();
}
@Override

View File

@@ -63,7 +63,7 @@ public class LfsBlobStoreFactoryTest {
@Test
public void getBlobStore() {
when(blobStoreFactory.forType(any())).thenCallRealMethod();
when(blobStoreFactory.withName(any())).thenCallRealMethod();
Repository repository = new Repository("the-id", "GIT", "space", "the-name");
lfsBlobStoreFactory.getLfsBlobStore(repository);