Author: jharting
Date: 2009-07-28 09:03:47 -0400 (Tue, 28 Jul 2009)
New Revision: 3312
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Counter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Game.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
Log:
Rewritten test for 5.8 c)
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Counter.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Counter.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Counter.java 2009-07-28
13:03:47 UTC (rev 3312)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.lookup.el;
+
+import javax.enterprise.context.ApplicationScoped;
+
+@ApplicationScoped
+class Counter
+{
+ private int count = 0;
+
+ public void add() {
+ count++;
+ }
+
+ public int getCount() {
+ return count;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Game.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Game.java
(rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Game.java 2009-07-28
13:03:47 UTC (rev 3312)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.lookup.el;
+
+import javax.enterprise.inject.Initializer;
+import javax.enterprise.inject.Named;
+
+@Named
+class Game
+{
+ @Initializer
+ public void initialize(Counter counter) {
+ counter.add();
+ }
+
+ public boolean getValue() {
+ return true;
+ }
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-07-28
12:58:17 UTC (rev 3311)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-07-28
13:03:47 UTC (rev 3312)
@@ -33,15 +33,16 @@
public class ResolutionByNameTest extends AbstractJSR299Test
{
- @Test(groups="rewrite")
+ @Test(groups="ri-broken")
@SpecAssertions({
@SpecAssertion(section="5.8", id="c"),
@SpecAssertion(section="2.5", id="a")
})
+ //WBRI-322
public void testQualifiedNameLookup()
{
- assert
getCurrentConfiguration().getEl().evaluateValueExpression("#{javax.enterprise.context.conversation}",
Conversation.class) != null;
- assert
getCurrentConfiguration().getEl().evaluateValueExpression("#{javax.enterprise.context.conversation}",
Conversation.class) instanceof Conversation;
+ assert
getCurrentConfiguration().getEl().evaluateValueExpression("#{(game.value and
game.value) ? game.value : false}", Boolean.class);
+ assert getInstanceByType(Counter.class).getCount() == 1;
}
@Test(groups = "beanLifecycle")