<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:8pt"><div>Hi;<br><br>I am currently testing org.jboss.jsr299.tck.tests.policy.PolicyAvailabilityTest. My questions are on the following test methods<br><br>- testProducerPoliciesOnClass<br><br> Sheep is produced by "EnabledSheepProducer" class that is defined in beans.xml and "NotEnabledSheepProducer" class that is not defined in beans.xml. So the first assertion in the test is correct<br> 1) assert getBeans(Sheep.class, new AnnotationLiteral<Wild>(){}).size() == 2;<br><br>But how the second assertion is correct?<br> 2) assert getBeans(Sheep.class, new AnnotationLiteral<Tame>(){}).size() == 2;<br>NotEnabledSheepProducer is not defined in beans.xml. So producer field and method that is contained in this class are disabled.<br><br>- testProducerPoliciesOnMethodAndField<br>
CatProducer class defines producer field and method that are annotated with @Alternative. According to the spec section 5.1.1 "the alternative is a producer method, field or resource, and the bean class that declares the method or field is listed in beans.xml". CatProducer class is not defined in beans.xml so those producer beans must be disabled and must not be used in resolutions.<br><br>So the following assertions must be false, because CatProducer class is not defined in beans.xml<br> assert getBeans(Cat.class, new AnnotationLiteral<Wild>(){}).size() == 2;<br> assert getBeans(Cat.class, new AnnotationLiteral<Tame>(){}).size() == 2;<br><br>WDYT?<br><br>Thanks;<br><br>--Gurkan<br></div>
<!-- cg26.c1.mail.mud.yahoo.com compressed/chunked Fri Jan 1 05:29:58 PST 2010 -->
</div><br>
<hr size="1"><FONT face=Arial size=-1>Yahoo! Türkiye açıldı!<br>
Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!<br><a href="http://tr.yahoo.com/">www.yahoo.com.tr</a></font></body></html>