Author: shane.bryzak(a)jboss.com
Date: 2009-03-15 21:38:54 -0400 (Sun, 15 Mar 2009)
New Revision: 2020
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
5.7.2 tests, reword assertions
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-03-16
01:13:04 UTC (rev 2019)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-03-16
01:38:54 UTC (rev 2020)
@@ -1,5 +1,11 @@
package org.jboss.jsr299.tck.tests.lookup.manager;
+import javax.context.Dependent;
+import javax.inject.Current;
+import javax.inject.Standard;
+import javax.inject.manager.Bean;
+import javax.inject.manager.Manager;
+
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -27,7 +33,34 @@
assert fishFarmOffice.manager != null;
}
- }.run();
-
+ }.run();
}
+
+ @Test
+ @SpecAssertion(section = "5.7.2", id = "aa")
+ public void testContainerProvidesManagerBean()
+ {
+ assert getCurrentManager().resolveByType(Manager.class).size() > 0;
+ }
+
+ @SpecAssertion(section = "5.7.2", id = "ab")
+ public void testManagerBeanIsDependentScoped()
+ {
+ Bean<Manager> manager =
getCurrentManager().resolveByType(Manager.class).iterator().next();
+ assert manager.getScopeType().equals(Dependent.class);
+ }
+
+ @SpecAssertion(section = "5.7.2", id = "ac")
+ public void testManagerBeanHasStandardDeployment()
+ {
+ Bean<Manager> manager =
getCurrentManager().resolveByType(Manager.class).iterator().next();
+ assert manager.getDeploymentType().equals(Standard.class);
+ }
+
+ @SpecAssertion(section = "5.7.2", id = "ad")
+ public void testManagerBeanHasCurrentBinding()
+ {
+ Bean<Manager> manager =
getCurrentManager().resolveByType(Manager.class).iterator().next();
+ assert manager.getBindings().iterator().next() instanceof Current;
+ }
}
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-16 01:13:04 UTC (rev 2019)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-16 01:38:54 UTC (rev 2020)
@@ -2989,15 +2989,15 @@
</assertion>
<assertion id="ab">
- <text>The container provides a built-in bean with scope
@Dependent</text>
+ <text>The container-provided Manager bean has a scope type of
@Dependent</text>
</assertion>
<assertion id="ac">
- <text>The container provides a built-in bean with deployment type
@Standard</text>
+ <text>The container-provided Manager bean has a deployment type of
@Standard</text>
</assertion>
<assertion id="ad">
- <text>The container provides a built-in bean with binding
@Current.</text>
+ <text>The container-provided Manager bean has a binding type of
@Current.</text>
</assertion>
<assertion id="b">
Show replies by date