Closed GoogleCodeExporter closed 8 years ago
Good suggestion.
I think we should add this new method and also the BaseDescription class.
At the very least we should get BaseDescription in the 1.1 release.
Original comment by joe.wal...@gmail.com
on 26 May 2007 at 10:28
I'd like the method to be named appendDescriptionOf.
Original comment by nat.pr...@gmail.com
on 30 May 2007 at 8:27
I agree with Nat on the name.
As for where to put the method...
Does a BaseDescription help?
Unless the SelfDescribing interface changes to accept BaseDescription instead of
Description nobody is going to be able to get at the new method.
Unless we introduce a downcast and a new describeTo(BaseDescription) method in
BaseMatcher...
Original comment by neild...@gmail.com
on 31 May 2007 at 3:29
I think it's fine to change the Description interface. This is an interface
that
Matchers call not implement, so changes to the interface won't break any third
party
matchers.
However, we do need a BaseDescription class so that third parties can implement
new
Description implementations. BaseDescription should leave appendText abstract
and
implement everything else in terms of that. Subclasses can then implement
appendText
and get two benefits: (1) they won't have to implement any formatting
themselves, and
(2) they are insulated from changes to the Description interface.
Original comment by nat.pr...@gmail.com
on 1 Jun 2007 at 12:04
I've checked in an implementation.
Original comment by nat.pr...@gmail.com
on 1 Jun 2007 at 12:40
Original issue reported on code.google.com by
david.s...@gmail.com
on 25 May 2007 at 12:31