move reladomo ex to librarie-data (#2485)
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
package com.baeldung.reladomo;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
|
||||
import com.gs.fw.common.mithra.test.MithraTestResource;
|
||||
|
||||
public class ReladomoTest {
|
||||
private MithraTestResource mithraTestResource;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
this.mithraTestResource = new MithraTestResource("reladomo/ReladomoTestConfig.xml");
|
||||
|
||||
final ConnectionManagerForTests connectionManager = ConnectionManagerForTests.getInstanceForDbName("testDb");
|
||||
this.mithraTestResource.createSingleDatabase(connectionManager);
|
||||
|
||||
mithraTestResource.addTestDataToDatabase("reladomo/test-data.txt", connectionManager);
|
||||
|
||||
this.mithraTestResource.setUp();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenGetTestData_thenOk() {
|
||||
Employee employee = EmployeeFinder.findByPrimaryKey(1);
|
||||
assertEquals(employee.getName(), "Paul");
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
this.mithraTestResource.tearDown();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<MithraRuntime>
|
||||
<ConnectionManager className="com.gs.fw.common.mithra.test.ConnectionManagerForTests">
|
||||
<Property name="resourceName" value="testDb"/>
|
||||
<MithraObjectConfiguration className="com.baeldung.reladomo.Department" cacheType="partial"/>
|
||||
<MithraObjectConfiguration className="com.baeldung.reladomo.Employee " cacheType="partial"/>
|
||||
</ConnectionManager>
|
||||
</MithraRuntime>
|
||||
@@ -1,7 +0,0 @@
|
||||
class com.baeldung.reladomo.Department
|
||||
id, name
|
||||
1, "Marketing"
|
||||
|
||||
class com.baeldung.reladomo.Employee
|
||||
id, name
|
||||
1, "Paul"
|
||||
Reference in New Issue
Block a user