harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: [classlib] exception messages
Date Sat, 13 May 2006 11:14:06 GMT
Another (more preferable for me) way could be set a specific locale and
compare to the message for this locale

Thanks,
Mikhail.

2006/5/13, Andrew Zhang <zhanghuangzhu@gmail.com>:
> Hello,
>
> If we really decide to test exception message, I think we could write test
> case as follows:
>
> public void test_f(){
>    .....
>    catch(SomeException e){
>         assertEquals(org.apache.util.Msg.getString("K508C"),e.getMessage
> ());
>    }
> }
>
> Does it work?  Because what we want to make sure it that "SomeException" is
> really thrown with message K508C. So that's another reason that we should
> use Msg.getString  rather than explicit string to fill exception
> information.
>
> On 5/13/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> >
> > Loenko, Mikhail Y wrote:
> > > From: Tim Ellison [mailto:t.p.ellison@gmail.com]
> > >> So let me refine my position to say, "our API tests shouldn't be
> > >> asserting the value of unspecified parts of an exception message".
> > >> Does that make sense?
> > >
> > > Yes, it does. But we might have impl tests that check for exception
> > > messages.
> >
> > Ok, provided they still pass when I translate the message catalog to
> > Klingon ;-)
> >
> > Regards,
> > Tim
> >
> > --
> >
> > Tim Ellison (t.p.ellison@gmail.com)
> > IBM Java technology centre, UK.
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message