mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-08-30 11:06:08 +02:00
Do no longer expose StoreParameters
This commit is contained in:
@@ -50,7 +50,6 @@ import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static sonia.scm.store.StoreParameters.forType;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -70,12 +69,11 @@ public abstract class BlobStoreTestBase extends AbstractTestBase
|
||||
@Before
|
||||
public void createBlobStore()
|
||||
{
|
||||
store = createBlobStoreFactory().getStore(
|
||||
store = createBlobStoreFactory().
|
||||
forType(Blob.class)
|
||||
.withName("test")
|
||||
.forRepository(RepositoryTestData.createHeartOfGold())
|
||||
.build()
|
||||
);
|
||||
.build();
|
||||
store.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@ package sonia.scm.store;
|
||||
|
||||
import sonia.scm.repository.Repository;
|
||||
|
||||
import static sonia.scm.store.StoreParameters.forType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -53,18 +51,16 @@ public abstract class ConfigurationEntryStoreTestBase extends KeyValueStoreTestB
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
@Override
|
||||
protected ConfigurationEntryStore getDataStore(Class type) {
|
||||
StoreParameters params = forType(type)
|
||||
return this.createConfigurationStoreFactory().forType(type)
|
||||
.withName(storeName)
|
||||
.build();
|
||||
return this.createConfigurationStoreFactory().getStore(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConfigurationEntryStore getDataStore(Class type, Repository repository) {
|
||||
StoreParameters params = forType(type)
|
||||
.withName(repoStoreName)
|
||||
.forRepository(repository)
|
||||
.build();
|
||||
return this.createConfigurationStoreFactory().getStore(params);
|
||||
return this.createConfigurationStoreFactory().forType(type)
|
||||
.withName(repoStoreName)
|
||||
.forRepository(repository)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ import sonia.scm.repository.RepositoryTestData;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static sonia.scm.store.StoreParameters.forType;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -57,12 +56,6 @@ public abstract class DataStoreTestBase extends KeyValueStoreTestBase
|
||||
protected abstract DataStoreFactory createDataStoreFactory();
|
||||
|
||||
|
||||
protected StoreParameters getStoreParametersWithRepository(Repository repository) {
|
||||
return forType(StoreObject.class)
|
||||
.withName("test")
|
||||
.forRepository(repository)
|
||||
.build();
|
||||
}
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
|
||||
@@ -76,7 +69,10 @@ public abstract class DataStoreTestBase extends KeyValueStoreTestBase
|
||||
StoreObject obj = new StoreObject("test-1");
|
||||
Repository repository = RepositoryTestData.createHeartOfGold();
|
||||
|
||||
DataStore<StoreObject> store = dataStoreFactory.getStore(getStoreParametersWithRepository(repository));
|
||||
DataStore<StoreObject> store = dataStoreFactory.forType(StoreObject.class)
|
||||
.withName("test")
|
||||
.forRepository(repository)
|
||||
.build();
|
||||
|
||||
String id = store.put(obj);
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ import sonia.scm.AbstractTestBase;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static sonia.scm.store.StoreParameters.forType;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -67,7 +66,7 @@ public abstract class StoreTestBase extends AbstractTestBase
|
||||
@Test
|
||||
public void testGet()
|
||||
{
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().getStore(forType(StoreObject.class).withName("test").build());
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().forType(StoreObject.class).withName("test").build();
|
||||
|
||||
assertNotNull(store);
|
||||
|
||||
@@ -83,7 +82,7 @@ public abstract class StoreTestBase extends AbstractTestBase
|
||||
@Test
|
||||
public void testSet()
|
||||
{
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().getStore(forType(StoreObject.class).withName("test").build());
|
||||
ConfigurationStore<StoreObject> store = createStoreFactory().forType(StoreObject.class).withName("test").build();
|
||||
|
||||
assertNotNull(store);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user