mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-06-15 09:00:58 +02:00
Make type optional
This commit is contained in:
@@ -69,11 +69,10 @@ public abstract class BlobStoreTestBase extends AbstractTestBase
|
||||
@Before
|
||||
public void createBlobStore()
|
||||
{
|
||||
store = createBlobStoreFactory().
|
||||
forType(Blob.class)
|
||||
.withName("test")
|
||||
.forRepository(RepositoryTestData.createHeartOfGold())
|
||||
.build();
|
||||
store = createBlobStoreFactory()
|
||||
.withName("test")
|
||||
.forRepository(RepositoryTestData.createHeartOfGold())
|
||||
.build();
|
||||
store.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,15 +51,17 @@ public abstract class ConfigurationEntryStoreTestBase extends KeyValueStoreTestB
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
@Override
|
||||
protected ConfigurationEntryStore getDataStore(Class type) {
|
||||
return this.createConfigurationStoreFactory().forType(type)
|
||||
return this.createConfigurationStoreFactory()
|
||||
.withName(storeName)
|
||||
.withType(type)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConfigurationEntryStore getDataStore(Class type, Repository repository) {
|
||||
return this.createConfigurationStoreFactory().forType(type)
|
||||
return this.createConfigurationStoreFactory()
|
||||
.withName(repoStoreName)
|
||||
.withType(type)
|
||||
.forRepository(repository)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -69,8 +69,9 @@ public abstract class DataStoreTestBase extends KeyValueStoreTestBase
|
||||
StoreObject obj = new StoreObject("test-1");
|
||||
Repository repository = RepositoryTestData.createHeartOfGold();
|
||||
|
||||
DataStore<StoreObject> store = dataStoreFactory.forType(StoreObject.class)
|
||||
DataStore<StoreObject> store = dataStoreFactory
|
||||
.withName("test")
|
||||
.withType(StoreObject.class)
|
||||
.forRepository(repository)
|
||||
.build();
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public abstract class StoreTestBase extends AbstractTestBase
|
||||
@Test
|
||||
public void testGet()
|
||||
{
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().forType(StoreObject.class).withName("test").build();
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().withName("test").withType(StoreObject.class).build();
|
||||
|
||||
assertNotNull(store);
|
||||
|
||||
@@ -82,7 +82,7 @@ public abstract class StoreTestBase extends AbstractTestBase
|
||||
@Test
|
||||
public void testSet()
|
||||
{
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().forType(StoreObject.class).withName("test").build();
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().withName("test").withType(StoreObject.class).build();
|
||||
|
||||
assertNotNull(store);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user