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 <[EMAIL PROTECTED]> wrote:
Loenko, Mikhail Y wrote: > From: Tim Ellison [mailto:[EMAIL PROTECTED] >> 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 ([EMAIL PROTECTED]) IBM Java technology centre, UK. --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Andrew Zhang China Software Development Lab, IBM