Fornax-Platform
Forum

JUnit test for a service of an abstract entity

View: New views
3 Messages — Rating Filter:   Alert me  

JUnit test for a service of an abstract entity

by Sascha Broich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have my service which accesses an abstract entity's repository.
Sculptor generates the test file for it. But now I'm wondering how I implement these test cases.
My problem comes from the fact, that instantiable subclasses of the abstract entity will be created in other artifacts.
Has someone already done such a case?


Regards,
Sascha Broich
--
TSA - Teleport Sachsen-Anhalt Service GmbH Delitzscher Straße 70, 06112 Halle
Phone: +49 39203 8 2524
Email: Sascha.Broich@...

Firmensitz: Steinfeldstraße 5, D-39179 Barleben
Geschäftsführer: Marco Langhof
Amtsgericht: Stendal HRB 6388
http://www.tsa.de

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: JUnit test for a service of an abstract entity

by PaloT :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Many ways:
1) Skip tests completely ;-) - add parameter '-Dmaven.test.skip=true' to 'mvn'
2) Skip one test case - return true from this unit test
3) Maybe here is some misunderstanding but you have to have at least
one concrete implementation of class on entity tier (also hibernate
can create only non abstract instances). Than you should write test
with this real class (maybe more different real classes).

Regards

Pavel

On Wed, Jul 29, 2009 at 10:49 AM, Sascha Broich -
TSA<sascha.broich@...> wrote:

> Hi,
>
> I have my service which accesses an abstract entity's repository.
> Sculptor generates the test file for it. But now I'm wondering how I implement these test cases.
> My problem comes from the fact, that instantiable subclasses of the abstract entity will be created in other artifacts.
> Has someone already done such a case?
>
>
> Regards,
> Sascha Broich
> --
> TSA - Teleport Sachsen-Anhalt Service GmbH Delitzscher Straße 70, 06112 Halle
> Phone: +49 39203 8 2524
> Email: Sascha.Broich@...
>
> Firmensitz: Steinfeldstraße 5, D-39179 Barleben
> Geschäftsführer: Marco Langhof
> Amtsgericht: Stendal HRB 6388
> http://www.tsa.de
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@...
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: JUnit test for a service of an abstract entity

by Sascha Broich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

this is, what I thought. But I wasn't completely sure. There could have been a way to test such a case, 'cause I'm new to Hibernate and JUnit.


Regards,
Sascha Broich


> Von: Pavel Tavoda [mailto:pavel.tavoda@...]
> Many ways:
> 1) Skip tests completely ;-) - add parameter '-Dmaven.test.skip=true'
> to 'mvn'
> 2) Skip one test case - return true from this unit test
> 3) Maybe here is some misunderstanding but you have to have at least
> one concrete implementation of class on entity tier (also hibernate
> can create only non abstract instances). Than you should write test
> with this real class (maybe more different real classes).
>
> Regards
>
> Pavel
>
> On Wed, Jul 29, 2009 at 10:49 AM, Sascha Broich -
> TSA<sascha.broich@...> wrote:
> > Hi,
> >
> > I have my service which accesses an abstract entity's repository.
> > Sculptor generates the test file for it. But now I'm wondering how I
> implement these test cases.
> > My problem comes from the fact, that instantiable subclasses of the
> abstract entity will be created in other artifacts.
> > Has someone already done such a case?
> >
> >
> > Regards,
> > Sascha Broich

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer