Re: What is/are the difference(s) between assertSame and assertEquals in JUnit?
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Sat, 09 Aug 2008 14:54:30 -0400
Stanimir Stamenkov wrote:
Fri, 08 Aug 2008 21:25:42 -0400, /Lew/:Arne Vajhøj wrote:Maybe assertSame should have been called assertSameObject.
It would have made the meaning of it more obvious.
Perhaps it would have, but I don't see it. How about 'assertIsSame()'? This extends the convention that "isX" expresses a boolean condition "X", and avoids the noise-word "Object" in the method name.
May be it is not 'assertIsSame()' as it is not an instance method and takes up two arguments, so one may think of 'assertAreSame' (they). :-)
Anyway, I think 'assertSame' is just fine as it keeps the name reasonably short which makes it more convenient once you get use to it.
Short variable names are not a major priority for me.
Arne
.
- References:
- Re: What is/are the difference(s) between assertSame and assertEquals in JUnit?
- From: Stanimir Stamenkov
- Re: What is/are the difference(s) between assertSame and assertEquals in JUnit?
- Prev by Date: Re: ftp in java
- Next by Date: Re: Creating a simple visual user interface
- Previous by thread: Re: What is/are the difference(s) between assertSame and assertEquals in JUnit?
- Next by thread: Re: What is/are the difference(s) between assertSame and assertEquals in JUnit?
- Index(es):
Relevant Pages
|