am runnug a data set test in my module but am getting a "No Such Table Exeption . here is my dataset
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
<facelist_multipart multipart_id="1" patient_id="1" />
</dataset>
my test class
package org.openmrs.module.facelist;
import org.junit.Assert; import org.junit.Test; import org.openmrs.api.context.Context; import org.openmrs.module.facelist.Service.MultipartService; import org.openmrs.test.BaseModuleContextSensitiveTest;
/**
-
Tests the MyModuleService class and all of its methods **/ public class MyModuleServiceTest extends BaseModuleContextSensitiveTest {
@Test public void shouldreturnId() throws Exception { initializeInMemoryDatabase(); executeDataSet("Dataset.xml"); authenticate(); MultipartService muiltipartService = Context.getService(MultipartService.class); Assert.assertEquals( muiltipartService.getMultipart(1).getPatient_ID(),1); }
}
test configuration file
<?xml version="1.0" encoding="UTF-8"?>
<hibernate-configuration>
<session-factory>
<mapping resource="Multipart.hbm.xml"/>
</session-factory>
</hibernate-configuration>
and my testing application context file
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<bean id="sessionFactory" class="org.openmrs.api.db.hibernate.HibernateSessionFactoryBean">
<property name="configLocations">
<list>
<value>classpath*:hibernate.cfg.xml</value>
<value>classpath*: ManagingMultipart-hibernate.cfg.xml</value>
</list>
</property>
<property name="mappingJarLocations">
<ref bean="mappingJarResources" />
</property>
<!-- default properties must be set in the hibernate.default.properties -->
</bean>
</beans>