You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Juanjo Cuadrado <jj...@gmail.com> on 2006/08/22 08:50:14 UTC

JUnit and iBatis

Hi,

    I'm new in iBatis and I need to do unit tests with it (JUnit). Anyone
can tell me how to use both tools?

    A manual or any kind of documentation about this will also be welcome.

    I'm sorry for me Englihs.

Re: How can I obtain a java.sql.Connection

Posted by Koka Kiknadze <22...@gmail.com>.
 I think

Connection conn = sqlMapClient.getDataSource().getConnection();

will do it

How can I obtain a java.sql.Connection

Posted by Dieresis <di...@sent.com>.
For a large chunk of legacy code that I have no time to convert right 
now, I need to get a simple java.sql.Connection from iBATIS. However, I 
have been unable to find the method. Can anyone help? We use SqlMaps 
with iBATIS DAOs, version 2.2.0.


Re: JUnit and iBatis

Posted by Juanjo Cuadrado <jj...@gmail.com>.
I have seen the light!!!!!!!

A lot of thanks!!!!

... and sorry for me English


2006/8/23, Gwyn Evans <gw...@gmail.com>:
>
> Basics of Mocks...
>
> http://www.martinfowler.com/articles/mocksArentStubs.html and
> http://www.devx.com/Java/Article/22599
>
> See http://www.easymock.org/ and http://www.jmock.org/ for two popular
> libraries.
>
> /Gwyn
>
>
> On 23/08/06, Juanjo Cuadrado <jj...@gmail.com> wrote:
> >
> > my own code...
> >
> > I have been looking the example JPetStore, but I don't understand it
> > totally.... probably, my level it isn't sufficient to understand it....
> >
> > I need to do unit tests with the classes that I did with the framework
> of
> > ibatis... but I don't know where I have to start...
> >
> > I need to nkow the basic of mocks... its teory.
> >
> > thanks.
> >
> > 2006/8/22, Nathan Maves <na...@gmail.com>:
> > >
> > > Are you looking to test your own code or the ibatis code base?
> > >
> > >
> > >
> > > On 8/22/06, Juanjo Cuadrado <jjcuadrado@gmail.com > wrote:
> > > >
> > > >
> > > > Hi,
> > > >
> > > >     I'm new in iBatis and I need to do unit tests with it (JUnit).
> > Anyone can tell me how to use both tools?
> > > >
> > > >     A manual or any kind of documentation about this will also be
> > welcome.
> > > >
> > > >     I'm sorry for me Englihs.
> > >
> > >
> >
> >
>
>
> --
> Download Wicket 1.2.1 now! - http://wicketframework.org
>

Re: JUnit and iBatis

Posted by Gwyn Evans <gw...@gmail.com>.
Basics of Mocks...

http://www.martinfowler.com/articles/mocksArentStubs.html and
http://www.devx.com/Java/Article/22599

See http://www.easymock.org/ and http://www.jmock.org/ for two popular
libraries.

/Gwyn


On 23/08/06, Juanjo Cuadrado <jj...@gmail.com> wrote:
>
> my own code...
>
> I have been looking the example JPetStore, but I don't understand it
> totally.... probably, my level it isn't sufficient to understand it....
>
> I need to do unit tests with the classes that I did with the framework of
> ibatis... but I don't know where I have to start...
>
> I need to nkow the basic of mocks... its teory.
>
> thanks.
>
> 2006/8/22, Nathan Maves <na...@gmail.com>:
> >
> > Are you looking to test your own code or the ibatis code base?
> >
> >
> >
> > On 8/22/06, Juanjo Cuadrado <jjcuadrado@gmail.com > wrote:
> > >
> > >
> > > Hi,
> > >
> > >     I'm new in iBatis and I need to do unit tests with it (JUnit).
> Anyone can tell me how to use both tools?
> > >
> > >     A manual or any kind of documentation about this will also be
> welcome.
> > >
> > >     I'm sorry for me Englihs.
> >
> >
>
>


-- 
Download Wicket 1.2.1 now! - http://wicketframework.org

Re: JUnit and iBatis

Posted by Juanjo Cuadrado <jj...@gmail.com>.
my own code...

I have been looking the example JPetStore, but I don't understand it
totally.... probably, my level it isn't sufficient to understand it....

I need to do unit tests with the classes that I did with the framework of
ibatis... but I don't know where I have to start...

I need to nkow the basic of mocks... its teory.

thanks.

2006/8/22, Nathan Maves <na...@gmail.com>:
>
> Are you looking to test your own code or the ibatis code base?
>
>
> On 8/22/06, Juanjo Cuadrado <jjcuadrado@gmail.com > wrote:
> >
> >  Hi,
> >
> >     I'm new in iBatis and I need to do unit tests with it (JUnit).
> > Anyone can tell me how to use both tools?
> >
> >     A manual or any kind of documentation about this will also be
> > welcome.
> >
> >     I'm sorry for me Englihs.
> >
>
>

Re: JUnit and iBatis

Posted by Nathan Maves <na...@gmail.com>.
Are you looking to test your own code or the ibatis code base?

On 8/22/06, Juanjo Cuadrado <jj...@gmail.com> wrote:
>
> Hi,
>
>     I'm new in iBatis and I need to do unit tests with it (JUnit). Anyone
> can tell me how to use both tools?
>
>     A manual or any kind of documentation about this will also be welcome.
>
>     I'm sorry for me Englihs.
>

RE: JUnit and iBatis

Posted by "Hariharan, Vadivelu (IE10)" <Ha...@honeywell.com>.
You can get the Junit tests from 

 

http://cvs.apache.org/dist/ibatis/ibatis.java/builds/JPetStore-5.0.zip

 

 

  _____  

From: Juanjo Cuadrado [mailto:jjcuadrado@gmail.com] 
Sent: Tuesday, August 22, 2006 12:20 PM
To: user-java@ibatis.apache.org
Subject: JUnit and iBatis

 

Hi,

 

    I'm new in iBatis and I need to do unit tests with it (JUnit).
Anyone can tell me how to use both tools? 

 

    A manual or any kind of documentation about this will also be
welcome.

  

    I'm sorry for me Englihs.