org.jboss.webbeans.tck.unit.lookup.byname
Class ResolutionByNameTest
java.lang.Object
org.jboss.webbeans.tck.AbstractTest
org.jboss.webbeans.tck.unit.lookup.byname.ResolutionByNameTest
public class ResolutionByNameTest
- extends AbstractTest
Spec version: PRD2
|
Method Summary |
protected java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getEnabledDeploymentTypes()
This method should be overridden by test classes which need to enable
additional deployment types beyond the normal ones. |
void |
testDuplicateNamedBeans()
• Otherwise, if resolveByName() returned more than one Web Bean, throw an
AmbiguousDependencyException. |
void |
testELResolver()
The getInstanceByName() method must:
• Identify the Web Bean by calling Manager.resolveByName(), passing the name. |
void |
testNamedBasedResolution()
|
void |
testNoWebBeansFound()
|
void |
testOnlyHighestPrecedenceResolved()
The following algorithm must be used by the Web Bean manager when resolving a Web Bean by name:
• The Web Bean manager identifies the set of matching enabled Web Beans which have the given name. |
| Methods inherited from class org.jboss.webbeans.tck.AbstractTest |
activateDependentContext, after, before, createEnterpriseBean, createProducerFieldBean, createProducerMethodBean, createSimpleBean, deactivateDependentContext, deployBeans, deserialize, getStandardDeploymentTypes, mockCreationalContext, serialize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResolutionByNameTest
public ResolutionByNameTest()
getEnabledDeploymentTypes
protected java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getEnabledDeploymentTypes()
- Description copied from class:
AbstractTest
- This method should be overridden by test classes which need to enable
additional deployment types beyond the normal ones.
- Overrides:
getEnabledDeploymentTypes in class AbstractTest
- Returns:
- the list of enabled deployment types
testELResolver
@SpecAssertion(section="5.11")
public void testELResolver()
- The getInstanceByName() method must:
• Identify the Web Bean by calling Manager.resolveByName(), passing the name.
• If resolveByName() returned an empty set, return a null value.
• Otherwise, if exactly one Web Bean was returned, obtain an instance of the
Web Bean by calling Manager.getInstance(), passing the Bean instance representing
the Web Bean
testDuplicateNamedBeans
@SpecAssertion(section="5.11")
public void testDuplicateNamedBeans()
- • Otherwise, if resolveByName() returned more than one Web Bean, throw an
AmbiguousDependencyException.
testNamedBasedResolution
@SpecAssertion(section="5.11")
public void testNamedBasedResolution()
testNoWebBeansFound
@SpecAssertion(section="5.11")
public void testNoWebBeansFound()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOnlyHighestPrecedenceResolved
@SpecAssertion(section="5.11")
public void testOnlyHighestPrecedenceResolved()
- The following algorithm must be used by the Web Bean manager when resolving a Web Bean by name:
• The Web Bean manager identifies the set of matching enabled Web Beans which have the given name.
• Next, the Web Bean manager examines the deployment types of the matching Web Beans, as defined
in Section 2.5.7, “Deployment type precedence”, and returns the set of Web Beans with the
highest precedence deployment type that occurs in the set. If there are no matching Web Beans,
an empty set is returned.
Copyright © 2008-2009. All Rights Reserved.