[weld-dev] [TCK Related] Question on SimpleBeanLifecycleTest

David Allen drallendc at gmail.com
Sun Jan 10 10:30:20 EST 2010


On Sat, 2010-01-09 at 13:55 -0800, Gurkan Erdogdu wrote:
> Hi;
> 
> In test SimpleBeanLifecycleTest #
> testSpecializedBeanExtendsManagedBean, MountainLion specializes the
> Lion so the managed bean with Lion is never resolved.
> 
> So getBeans(Lion.class, TAME_LITERAL) returns bean with MountationLion
> not bean with Lion.

As the test shows, both MountainLion and Lion are returned.  There are
no alternatives being used here.  It is strictly testing @Specializes
for a managed bean, and as required by the spec, the specializing bean
inherits the @Tame qualifier.  That is why both beans are resolved based
on the type and qualifiers specified in the test.

> 
> Therefore assert bean != null; in the test case seems not to be
> correct!
> 
> WDYT?
> 
> Thks;
> 
> --Gurkan
> 
> 
> 
> ______________________________________________________________________
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev



More information about the weld-dev mailing list