Re: [classlib] exception messages

2006-05-14 Thread Mikhail Loenko
Hi Andrew The problem with this test is that it will not catch the change of the message for the given key. For example if we throw some message from 3 points in the code and we do some change in the property file that is acceptable for two points but not acceptable for the 3rd one, we will not

Re: [classlib] exception messages

2006-05-13 Thread Mikhail Loenko
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 [EMAIL PROTECTED]: Hello, If we really decide to test exception message, I think we could write test case as follows: public void test_f(){

Re: [classlib] exception messages

2006-05-13 Thread Andrew Zhang
Hello, Mikhail org.apache.harmony.luni.util.Msg has already handled locale issue. So it's not neccessary to get locale inforamtion again in test case, and then get i18n message. For example, following code is from java.net.HttpURLConnection.java method setRequestMethod: if (connected)

[classlib] exception messages (was: Re: svn commit: r400008 - in /incubator/harmony/enhanced/classlib/trunk/modules/text/src: main/java/java/text/ test/java/org/apache/harmony/text/tests/java/text/)

2006-05-12 Thread Tim Ellison
(sorry for the late response) Mikhail Loenko wrote: For both items we had discussions that did not complete to decisions: About exception messages Geir was going to contact Sun. I believe the issue was not whether we can copy Sun's exception messages but the problem of a test case asserting

Re: [classlib] exception messages

2006-05-12 Thread Tim Ellison
Mikhail Loenko wrote: 2006/5/12, Tim Ellison [EMAIL PROTECTED]: Tests shouldn't assert the actual message String in an exception. I disagree. We need some technique to test exception messages. As I wrote in the thread should strings in exceptions match the reference implementation?

RE: [classlib] exception messages

2006-05-12 Thread Loenko, Mikhail Y
From: Tim Ellison [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 10:50 PM To: harmony-dev@incubator.apache.org Subject: Re: [classlib] exception messages Mikhail Loenko wrote: 2006/5/12, Tim Ellison [EMAIL PROTECTED]: Tests shouldn't assert the actual message String in an exception. I