users@jaxb.java.net

RE: Re: interface

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Mon, 21 Jul 2008 15:04:49 +0200

Sure. You are right.

In my work I have to cover every part of the application with test and I
aim to cover to 100%. It will be easier to test if there are interfaces
to each class. But as you said it is only java bean classes in JAXB
generated classes.

Thank u.

Lul

-----Original Message-----
From: Kenny MacLeod [mailto:kennym_at_kizoom.com]
Sent: den 21 juli 2008 14:38
To: users_at_jaxb.dev.java.net
Subject: Re: interface

Lulseged Zerfu wrote:
> Today's testing framworks like junit and mostly easymock need a
> collaborator. It is an interface.

Not necessarily. Mock object frameworks are used to mock out software
components which have behaviour. JAXB-generated classes are just beans,
they have no significant behaviour (unless you use a fancy plugin).

Mocking out java beans is unnecessary, in my experience, you can just
use them as they are, and inject the data you want.

> It is easy to create interfaces
> manually but the problem is I have to update everytime I generate java

> classes from a schema.

> I would propse this feature (generating interface for each generated
> class) for the JAXB team.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net