Author: shane.bryzak(a)jboss.com
Date: 2009-03-09 21:52:17 -0400 (Mon, 09 Mar 2009)
New Revision: 1898
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/Animal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/AnimalDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/MockEntity.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBeanIsDecoratorAndInterceptorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBean_Broken.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
tck/trunk/pom.xml
Log:
section 3 tests
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/Animal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/Animal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/Animal.java 2009-03-10
01:52:17 UTC (rev 1898)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.definition;
+
+import javax.inject.Production;
+
+@Production
+interface Animal
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/AnimalDecorator.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/AnimalDecorator.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/AnimalDecorator.java 2009-03-10
01:52:17 UTC (rev 1898)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.definition;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+@Decorator
+abstract class AnimalDecorator implements Animal
+{
+ @Decorates Animal delegate;
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/MockEntity.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/MockEntity.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/MockEntity.java 2009-03-10
01:52:17 UTC (rev 1898)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.definition;
+
+import javax.inject.Production;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Production
+@Entity
+public class MockEntity
+{
+ private Integer id;
+
+ @Id
+ public Integer getId() { return id; }
+ public void setId(Integer id) { this.id = id; }
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-03-09
23:09:35 UTC (rev 1897)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-03-10
01:52:17 UTC (rev 1898)
@@ -28,6 +28,16 @@
{
assert getCurrentManager().resolveByType(Cow_NotBean.class).size() == 0;
}
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.2", id = "cb"),
+ @SpecAssertion(section = "3.2.1", id = "da")
+ })
+ public void testAbstractDecoratorClassDeclaredInJavaIsDiscovered()
+ {
+ assert getCurrentManager().resolveByType(AnimalDecorator.class).size() > 0;
+ }
@Test(groups = "innerClass")
@SpecAssertions({
@@ -58,6 +68,20 @@
{
assert getCurrentManager().resolveByType(ParameterizedClass_NotBean.class).size()
== 0;
}
+
+ @Test
+ @SpecAssertion(section = "3.2.1", id = "cb")
+ public void testInterfaceNotDiscoveredAsSimpleBean()
+ {
+ assert getCurrentManager().resolveByType(Animal.class).size() == 0;
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "3.2.1", id = "e")
+ public void testEntityClassesNotDiscoveredAsSimpleBean()
+ {
+ assert getCurrentManager().resolveByType(MockEntity.class).size() == 0;
+ }
@Test
@SpecAssertions( {
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBeanIsDecoratorAndInterceptorTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBeanIsDecoratorAndInterceptorTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBeanIsDecoratorAndInterceptorTest.java 2009-03-10
01:52:17 UTC (rev 1898)
@@ -0,0 +1,21 @@
+package
org.jboss.jsr299.tck.tests.implementation.simple.definition.interceptorAndDecorator;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class SimpleBeanIsDecoratorAndInterceptorTest extends AbstractDeclarativeTest
+{
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "3.2", id = "d")
+ public void testSimpleBeanCannotBeDecoratorAndInterceptor()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBean_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBean_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/interceptorAndDecorator/SimpleBean_Broken.java 2009-03-10
01:52:17 UTC (rev 1898)
@@ -0,0 +1,13 @@
+package
org.jboss.jsr299.tck.tests.implementation.simple.definition.interceptorAndDecorator;
+
+import javax.decorator.Decorator;
+import javax.inject.Production;
+import javax.interceptor.Interceptor;
+
+@Production
+@Decorator
+@Interceptor
+class SimpleBean_Broken
+{
+
+}
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-03-09 23:09:35 UTC (rev 1897)
+++ tck/trunk/pom.xml 2009-03-10 01:52:17 UTC (rev 1898)
@@ -109,12 +109,12 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>tck-utils-api</artifactId>
- <version>0.9</version>
+ <version>0.9.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>tck-utils-impl</artifactId>
- <version>0.9</version>
+ <version>0.9.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
Show replies by date