TCK on Policy Tests
by Gurkan Erdogdu
Hi;
I am currently testing org.jboss.jsr299.tck.tests.policy.PolicyAvailabilityTest. My questions are on the following test methods
- testProducerPoliciesOnClass
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
1) assert getBeans(Sheep.class, new AnnotationLiteral<Wild>(){}).size() == 2;
But how the second assertion is correct?
2) assert getBeans(Sheep.class, new AnnotationLiteral<Tame>(){}).size() == 2;
NotEnabledSheepProducer is not defined in beans.xml. So producer field and method that is contained in this class are disabled.
- testProducerPoliciesOnMethodAndField
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.
So the following assertions must be false, because CatProducer class is not defined in beans.xml
assert getBeans(Cat.class, new AnnotationLiteral<Wild>(){}).size() == 2;
assert getBeans(Cat.class, new AnnotationLiteral<Tame>(){}).size() == 2;
WDYT?
Thanks;
--Gurkan
___________________________________________________________________
Yahoo! Türkiye açıldı! http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!
15 years
Any plans for a weld-user ist?
by Johan Eltes
It would be great me and other users to get a weld-user list!
My major pain is to wrap my head around how to implement junit tests for cdi beans.
Having a place where users could get together to sort out essential issues for projects trying to use Weld, would be great. If anyone has a sample of a unit test that does not depend on anything else than weld 1.0.0 would be really great:
- How to have the test target object injected into the test case ?
... or...
- How to obtain an injected test target object from within the test case?
/Johan
15 years
CDI or Weld books?
by Norman Richards
Is anyone in the weld dev community working on a Weld or CDI book? I'm looking for books to promote on the DZone refcard. Thanks!
15 years
TCK Run with custom-web.xml
by Gurkan Erdogdu
Hi;
I have created a custom-web.xml according to package structure org/jboss/testharness/impl/packaging/war/custom-web.xml. But when I run LongRunningConversationPropagatedByFacesContextTest, it deploys with web.xml that is not custom-web.xml.
According to the code, WarArtifactDescriptor, it must honor custom-web.xml
What is wrong? And also what is the meaning of @IntegrationTest(local=true) ?
Thanks;
--Gurkan
___________________________________________________________________
Yahoo! Türkiye açıldı! http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!
15 years
Re: [weld-dev] Non flat deployments
by Ales Justin
> Probably the easiest way to address this is simply to mirror the
> classloading structure of war and ears in JBoss AS.
Perhaps I'll try to come up with something quickly for standard JEE
deployments, where CL structure is simple and well known.
But eventually we should have proper generic CL mapping.
e.g. when users use jboss-classloading.xml or OSGi
> * remember that we also need to access "installed
> libraries" - those things libraries installed in the AS. So IOW we
> need to have a list of all libraries which have beans.xml in them,
> and add them to each CDI deployment, so that libraries, modules in
> the deployment can see them but not vice-versa.
What's an "installed library"?
How do we track/recognize them?
e.g. "installed library" vs. normal CDI deployment
15 years