What do you mean it's "in the inheritance chain"? Since Junit 4,
inheriting from a JUnit base class is no longer necessary or desirable.
Those methods are static and are now imported statically. Likewise,
static imports would also be appropriate to use Spring's and Google's
validation code. Bas
So classical OO naming convention.
Class = noun
Method = verb
Validator.validateNotNull versus the non-OO Validate.notNull.
Theoretically - sure. Reality? assertEquals only works in JUnit
because it's in the inheritance chain. I think I'd dislike
Asserter.assertEquals :)
Hen
On Sun, Nov 29
It is a verb, of course, but methods should be verbs. I am only
appealing to the classical naming convention of methods. They do the
work; classes don't. You can't ask a class to validate; you can ask its
methods to validate.
Paul
On 11/30/2009 1:31 AM, Henri Yandell wrote:
Validate isn't a
Validate isn't a verb?
On Sun, Nov 29, 2009 at 9:06 PM, Paul Benedict wrote:
> I am not catering to static imports. I am catering towards a
> consistent naming convention. If you compare our names to what exists
> in Spring's and Google's API, you will find that ours are not
> verb-ified. The who
I am not catering to static imports. I am catering towards a
consistent naming convention. If you compare our names to what exists
in Spring's and Google's API, you will find that ours are not
verb-ified. The whole static import discussion is just an additional
benefit.
What I would like to focus
On Sun, Nov 29, 2009 at 1:32 PM, Paul Benedict wrote:
> On Sun, Nov 29, 2009 at 3:26 PM, Stephen Colebourne
> wrote:
>> Paul Benedict wrote:
>>>
>>> I want to rename isTrue to validateArgument (which throws
>>> IllegalArgumentException); then also introduce validateState (which throws
>>> Illegal
On Sun, Nov 29, 2009 at 3:26 PM, Stephen Colebourne
wrote:
> Paul Benedict wrote:
>>
>> I want to rename isTrue to validateArgument (which throws
>> IllegalArgumentException); then also introduce validateState (which throws
>> IllegalStateException).
>
> We have this in a work version of this clas
Paul Benedict wrote:
I want to rename isTrue to validateArgument (which throws
IllegalArgumentException); then also introduce validateState (which
throws IllegalStateException).
We have this in a work version of this class, I'm not sure that it
doesn't confuse the purpose of the class. As suc
I want to rename isTrue to validateArgument (which throws
IllegalArgumentException); then also introduce validateState (which
throws IllegalStateException).
I also propose we rename the methods so that the verb "validate"
prefixes them all (Google Collections uses "check"). Furthermore, this