[webbeans-commits] Webbeans SVN: r3660 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Sep 14 11:42:42 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-09-14 11:42:41 -0400 (Mon, 14 Sep 2009)
New Revision: 3660

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/Horse.java
Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/BeanDefinitionTest.java
Log:
Fix test that was incorrect and only passing due to a specific ordering in the RI.

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/BeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/BeanDefinitionTest.java	2009-09-14 11:39:54 UTC (rev 3659)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/BeanDefinitionTest.java	2009-09-14 15:42:41 UTC (rev 3660)
@@ -1,6 +1,7 @@
 package org.jboss.jsr299.tck.tests.definition.bean;
 
 import java.lang.annotation.Annotation;
+import java.util.Set;
 
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.inject.AnnotationLiteral;
@@ -159,6 +160,8 @@
    @SpecAssertion(section = "11.1", id = "bb")
    public void testBeanClassOnSimpleBean()
    {
-      assert getBeans(Spider.class).iterator().next().getBeanClass().equals(Spider.class);
+      Set<Bean<Horse>> beans = getBeans(Horse.class);
+      assert beans.size() == 1;
+      assert beans.iterator().next().getBeanClass().equals(Horse.class);
    }
 }
\ No newline at end of file

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/Horse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/Horse.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/Horse.java	2009-09-14 15:42:41 UTC (rev 3660)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.definition.bean;
+
+/**
+ * @author pmuir
+ *
+ */
+public class Horse
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/Horse.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the weld-commits mailing list