Solved it myself.
I just defined my datasource in the factory class as static, which saves my datasource-object for the next testsuite.
Type: Posts; User: LordNecro; Keyword(s):
Solved it myself.
I just defined my datasource in the factory class as static, which saves my datasource-object for the next testsuite.
Is there something I can do to help you helping me :)
but all tests in this fail because of the recreation of the datasource:
nearly the same test code just for another dao
a sample testfile. works fine when surefire runs just this
package test;
import static org.junit.Assert.*;
import java.sql.SQLException;
import javax.annotation.Resource;
My implementation of the Beanfactory
package test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import...
My Datasource definition:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
Hi,
I try to test my dao's like this:
TestInfrastructure-configuration.xml(attached) is defining my transactionmanager and datasource.
As you can see I defined a BeanFactory to create my...
5,764 INFO [] org.springframework.test.context.TestContextManager - @TestExecutionListeners is not present for class [class test.RezepteDaoTest]: using defaults.
2009-01-01 15:55:06,045 INFO []...
Hello,
First of all I am new to Spring, so please have mercy with me :-)
I am currently working on a simple project with transactional data access when I noticed some sort of strange behavior. ...
You have to give spring the whole class identifier.
I guess in your case the identifier for your class is
com.example.HelloImpl.
Try writing this in your XML file instead of HelloImpl.