[New] Added Unit tests to test the bulk operations
This commit is contained in:
parent
38d1cf61dd
commit
76d8d24ebd
|
@ -25,13 +25,12 @@ import org.junit.BeforeClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractDaoImplTest extends RuntimeMock {
|
public abstract class AbstractDaoImplTest extends RuntimeMock {
|
||||||
|
|
||||||
private static final String RUNTIME_PATH = "target/strolchRuntime/"; //$NON-NLS-1$
|
public static final String RUNTIME_PATH = "target/strolchRuntime/"; //$NON-NLS-1$
|
||||||
private static final String DB_STORE_PATH_DIR = "dbStore"; //$NON-NLS-1$
|
public static final String DB_STORE_PATH_DIR = "dbStore"; //$NON-NLS-1$
|
||||||
private static final String CONFIG_SRC = "src/test/resources/runtime/config"; //$NON-NLS-1$
|
public static final String CONFIG_SRC = "src/test/resources/runtime/config"; //$NON-NLS-1$
|
||||||
protected static PersistenceHandler persistenceHandler;
|
protected static PersistenceHandler persistenceHandler;
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
|
|
@ -15,14 +15,40 @@
|
||||||
*/
|
*/
|
||||||
package li.strolch.persistence.impl.dao.test;
|
package li.strolch.persistence.impl.dao.test;
|
||||||
|
|
||||||
import li.strolch.persistence.api.StrolchTransaction;
|
import java.io.File;
|
||||||
|
|
||||||
|
import li.strolch.persistence.api.PersistenceHandler;
|
||||||
|
import li.strolch.persistence.api.StrolchTransaction;
|
||||||
|
import li.strolch.testbase.runtime.RuntimeMock;
|
||||||
|
|
||||||
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||||
*/
|
*/
|
||||||
public class XmlContainerTest extends AbstractDaoImplTest {
|
public class XmlContainerTest extends RuntimeMock {
|
||||||
|
|
||||||
|
protected static PersistenceHandler persistenceHandler;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void beforeClass() {
|
||||||
|
|
||||||
|
File rootPath = new File(AbstractDaoImplTest.RUNTIME_PATH);
|
||||||
|
File configSrc = new File(AbstractDaoImplTest.CONFIG_SRC);
|
||||||
|
RuntimeMock.mockRuntime(rootPath, configSrc);
|
||||||
|
new File(rootPath, AbstractDaoImplTest.DB_STORE_PATH_DIR).mkdir();
|
||||||
|
RuntimeMock.startContainer(rootPath);
|
||||||
|
|
||||||
|
// initialize the component configuration
|
||||||
|
persistenceHandler = getContainer().getComponent(PersistenceHandler.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void afterClass() {
|
||||||
|
RuntimeMock.destroyRuntime();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldStartContainer() {
|
public void shouldStartContainer() {
|
||||||
|
|
Loading…
Reference in New Issue