Handle select statment with DBunit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Handle select statment with DBunit

ARobert
Hi,

I would like to know how it is possible to set MySQL DataBase as a reference
database for test, but to select data from XML Flat File generated DataSet
?

At the moment when I call method containing a select statment, I give a
"Connection" object as parameter, and this connection object seems to be my
real Database connection instead of my "Mock" DataSet.

Could you tell me where I can find documentation about that ?

Please could you provide any kind of answer, just to be sure someone read
this.
Reply | Threaded
Open this post in threaded view
|

Re: Handle select statment with DBunit

krishnan.1000
There is isn't one. You have to create your own SelectOperation for this purpose. None of the implementations of IPreparedStatement wrap an instance of PreparedStatement which is protected. You would have to extend one the implementations to acquire a handle to PreparedStatement to execute a query.

On Mon, Jul 27, 2009 at 9:10 AM, ARobert <[hidden email]> wrote:

Hi,

I would like to know how it is possible to set MySQL DataBase as a reference
database for test, but to select data from XML Flat File generated DataSet
?

At the moment when I call method containing a select statment, I give a
"Connection" object as parameter, and this connection object seems to be my
real Database connection instead of my "Mock" DataSet.

Could you tell me where I can find documentation about that ?

Please could you provide any kind of answer, just to be sure someone read
this.
--
View this message in context: http://www.nabble.com/Handle-select-statment-with-DBunit-tp24683491p24683491.html
Sent from the DBUnit - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------

_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user