RE: [picocontainer-dev] assymetry in resolution ( by key / by type )

Konstantin Priblouda <kpriblouda-/[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
--- Jörg Schaible <[email protected]>
wrote:

> Konstantin Priblouda wrote:
> > --- Jörg Schaible
> <[email protected]>
> > wrote:
> > 
> >> Paul Hammant wrote:
> >>> Konstantin,
> >>> 
> >>> Can you write some testcases for trunk that
> illustrate the curious
> >>> feature ? 
> >>> 
> >>> If there's implied kinks to iron out, we can
> discuss them around one
> >>> more more test methods :-)
> >> 
> >> The test cases are already available. Simply try
> to
> >> change the behaviour und you'll see which ones
> fail
> >> ;-)
> > 
> > 
> > Did a quck check:
> 
> You solved it the other way round! I tried to
> resolve always against the parent.
> 
> > ----------------%<---------------
> > Results :
> > 
> > Failed tests:
> > 
> >
>
testShouldCreateBowlWith2CodsOnly(org.picocontainer.doc.advanc
> > ed.MapsTestCase) 
> 
> 
> This is critical. The collections are explicitly
> used to gather all components of a type. It will
> certainly break some of my apps!

... as I did not modified CCP, it actually found 
more than should:

-------------------------------------------------------------------------------
Test set: org.picocontainer.doc.advanced.MapsTestCase
-------------------------------------------------------------------------------
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time
elapsed: 0.032 sec <<< FAILURE!
testShouldCreateBowlWith2CodsOnly(org.picocontainer.doc.advanced.MapsTestCase)
 Time elapsed: 0 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2> but
was:<3>
	at junit.framework.Assert.fail(Assert.java:47)
	at
junit.framework.Assert.failNotEquals(Assert.java:282)
	at
junit.framework.Assert.assertEquals(Assert.java:64)


I actually try to simplify collection lookup, so I'm
wondering what is design rationalein this case...

regards, 

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
JTec quality components: http://www.pribluda.de/projects/


      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.