[webbeans-commits] Webbeans SVN: r3148 - tck/trunk/doc/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-23 04:55:04 -0400 (Thu, 23 Jul 2009)
New Revision: 3148
Modified:
tck/trunk/doc/reference/en-US/configuration.xml
tck/trunk/doc/reference/en-US/executing.xml
tck/trunk/doc/reference/en-US/installation.xml
tck/trunk/doc/reference/en-US/introduction.xml
Log:
Fixed mistakes in reference documentation
Modified: tck/trunk/doc/reference/en-US/configuration.xml
===================================================================
--- tck/trunk/doc/reference/en-US/configuration.xml 2009-07-22 23:35:57 UTC (rev 3147)
+++ tck/trunk/doc/reference/en-US/configuration.xml 2009-07-23 08:55:04 UTC (rev 3148)
@@ -6,7 +6,7 @@
<section>
<title>JBoss Test Harness Properties</title>
<para>The JBoss Test Harness allows the test suite to be launched in a pluggable fashion. In order to execute the TCK, the JBoss Test Harness must be configured by specifying implementations of the test launcher and container APIs. All the required configuration that pertains to the JBoss Test Harness is applicable to the TCK as well.</para>
- <para>System properties and/or the resource META-INF/jboss-test-harness.properties, a Java properties file, are used to configure the JBoss Test Harness. The bootstrap configuration builder looks to the property <literal>org.jboss.testharness.api.ConfigurationBuilder</literal>, the first property listed in table 2.1.1, for the fully qualified class name (FQCN) of a concreate configuration builder implementation to get started. This implementation loads the remaining configuration settings and produces a JBoss Test Harness configuration.</para>
+ <para>System properties and/or the resource META-INF/jboss-test-harness.properties, a Java properties file, are used to configure the JBoss Test Harness. The bootstrap configuration builder looks to the property <literal>org.jboss.testharness.api.ConfigurationBuilder</literal>, the first property listed in table 3.1, for the fully qualified class name (FQCN) of a concreate configuration builder implementation to get started. This implementation loads the remaining configuration settings and produces a JBoss Test Harness configuration.</para>
<para>For you convenience, the default configuration builder implementation <literal>org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder</literal> is provided, which collects all the JBoss Test Harness configuration settings from Java properties. It does so by aggregating the system properties with the properties defined in the META-INF/jboss-test-harness.properties resource in any classpath entry under a single properties map, allowing you to partition the configuration settings as needed.</para>
<para>A complete list of configuration properties for the JBoss Test Harness has been itemized in table 2.1.1, accompanied by the default value (if any) and a description for each property.</para>
<table frame="all">
@@ -123,7 +123,7 @@
</tbody>
</tgroup>
</table>
- <para>The TCK also relies on implementations of the interfaces in the porting package. These implementations are also specified using system properties or the classpath resource META-INF/jboss-test-harness.properties. The implementation of each porting package SPI must be specified using the fully-qualified domain name (FQDN) of the interface mapped to a Java property. The properties that correspond to the interface which must be implemented are listed in table 2.1.2.</para>
+ <para>The TCK also relies on implementations of the interfaces in the porting package. These implementations are also specified using system properties or the classpath resource META-INF/jboss-test-harness.properties. The implementation of each porting package SPI must be specified using the fully-qualified domain name (FQDN) of the interface mapped to a Java property. The properties that correspond to the interface which must be implemented are listed in table 3.2.</para>
<table frame="all">
<title/>
<tgroup cols="2">
@@ -288,14 +288,14 @@
<para>The TCK is executed using the Maven TestNG plugin. Maven 2 profiles are used to control the properties that are set at the time of the execution. For instance, the <literal>incontainer</literal> profile enables integration tests and disables standalone mode, changing the default settings.</para>
<para>The jboss-tck-runner project also defines the JBoss Test Harness extra configuration directory using the following property:</para>
<programlisting>org.jboss.testharness.container.extraConfigurationDir=../jboss-as</programlisting>
- <para>The JBoss Test Harness looks in this directory for either a build.properties or local.build.properties file that declare additional configuration properties. In particular, the JBoss AS Containers implementation looks here to find the <literal>jboss.home</literal> property for starting and stopping JBoss AS.</para>
+ <para>The JBoss Test Harness looks in this directory for either a build.properties or local.build.properties file that declares additional configuration properties. In particular, the JBoss AS Containers implementation looks here to find the <literal>jboss.home</literal> property for starting and stopping JBoss AS.</para>
</section>
<section>
<title>Negotiating the execution of an in-container test</title>
<para>The basic procedure of an in-container test is as follows. The JBoss Test Harness produces a deployable artifact from an <literal>@Artifact</literal> test class and any declared dependent classes, descriptors or other resources. Then it deploys the artifact to the container using the <literal>Containers</literal> SPI, negotiates with the container to execute the test and return the result and, lastly, undeploys the artifact. TestNG collects the results of all the tests run in the typical way and produces a report.</para>
<graphic fileref="images/in-container-execution.png" align="center"/>
- <para>The question is, how does the JBoss Test Harness negotiate with the container to execute the test when TestNG is being invoked locally? Technially the mechanism is pluggable, but JBoss Test Harness provides a default implementation that uses HTTP communication that you will likely use. Here's how the default implementation works works.</para>
- <para>The artifact generator bundles and registers (in the web.xml descriptor) an <literal>HttpServlet</literal>, <literal>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</literal>, that responds to test execution GET requests. TestNG running on the client side delegates to a test launcher (more on that in a moment) which originates these text execution requests to transfer control to the container JVM. The name of the test method to be executed is specified in a request parameter named <literal>methodName</literal>.</para>
+ <para>The question is, how does the JBoss Test Harness negotiate with the container to execute the test when TestNG is being invoked locally? Technially the mechanism is pluggable, but JBoss Test Harness provides a default implementation that uses HTTP communication that you will likely use. Here's how the default implementation works.</para>
+ <para>The artifact generator bundles and registers (in the web.xml descriptor) an <literal>HttpServlet</literal>, <literal>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</literal>, that responds to test execution GET requests. TestNG running on the client side delegates to a test launcher (more on that in a moment) which originates these text execution requests to transfer control to the container JVM. The name of the test method to be executed is specified in a request query parameter named <literal>methodName</literal>.</para>
<para>When the test execution request is received, the servlet delegates to an instance of <literal>org.jboss.testharness.impl.runner.TestRunner</literal>, passing it the name of the test method. <literal>TestRunner</literal> reads the name of the test class from the resource META-INF/jboss-test-harness.properties, which is bundled in the artifact by the artifact generator. It then combines the class name with the method name to produce a TestNG test suite and runs the suite (in the context of the container).</para>
<para>TestNG returns the results of the run as an <literal>ITestResult</literal> object. <literal>ServletTestRunner</literal> translates this object into a <literal>org.jboss.testharness.api.TestResult</literal> and passes it back to the test launcher on the client side by encoding the translated object into the response. The object gets encoded as either html or a serialized object, depending on the value of the <literal>outputMode</literal> request parameter that was passed to the servlet. Once the result has been transfered to the client-side TestNG, TestNG wraps up the run of the test as though it had been executed in the same JVM.</para>
<para>There's one piece missing. How does TestNG on the client side know to submit a request to the <literal>ServletTestRunner</literal> servlet to get TestNG to execute the test in the container JVM? That's the role of the test launcher.</para>
Modified: tck/trunk/doc/reference/en-US/executing.xml
===================================================================
--- tck/trunk/doc/reference/en-US/executing.xml 2009-07-22 23:35:57 UTC (rev 3147)
+++ tck/trunk/doc/reference/en-US/executing.xml 2009-07-23 08:55:04 UTC (rev 3148)
@@ -51,7 +51,7 @@
<para>If you only want to write the artifacts to disk, and avoid executing the test suite, you can simply execute the main method of the class <literal>org.jboss.testharness.api.TCK</literal>. This execution is configured as a Maven profile that is activated when the <literal>dumpArtifacts</literal> command line property is defined:</para>
<programlisting>mvn test-compile -DdumpArtifacts</programlisting>
<para>The output directory where the artifacts are written is defined by the property <literal>org.jboss.testharness.outputDirectory</literal>. The jboss-tck-runner project is configured to dump the artifacts to the target/jsr299-artifacts directory.</para>
- <para>Once the artifact is written to disk, you have to option of manually deploying it to the container. You can execute the tests in the artfact by requesting the context path of the application in the browser. If you want to execute an individual test method, specify the method name in the <literal>methodName</literal> request parameter (e.g., ?methodName=testMethodName).</para>
+ <para>Once the artifact is written to disk, you have an option of manually deploying it to the container. You can execute the tests in the artfact by requesting the context path of the application in the browser. If you want to execute an individual test method, specify the method name in the <literal>methodName</literal> request parameter (e.g., ?methodName=testMethodName).</para>
</section>
<section>
<title>Running a Test in Eclipse</title>
Modified: tck/trunk/doc/reference/en-US/installation.xml
===================================================================
--- tck/trunk/doc/reference/en-US/installation.xml 2009-07-22 23:35:57 UTC (rev 3147)
+++ tck/trunk/doc/reference/en-US/installation.xml 2009-07-23 08:55:04 UTC (rev 3148)
@@ -53,7 +53,7 @@
<para>As mentioned earlier, because the JSR-299 RI and TCK are built with Maven 2, it's essential to have Maven 2 installed on the system. You can find documention on how to install Maven 2 in the <ulink url="http://www.sonatype.com/books/maven-book/reference/installation-sect-mave...">Maven: The Definitive Guide</ulink> book published by Sonatype. It merely entails extracting the distribution and putting the bin directory in the user's PATH environment variable.</para>
<programlisting>export PATH="<maven2_install_dir>/bin:$PATH"</programlisting>
<para>The TCK runner, introduced in section 4.2, is organized as a Maven 2 project (herein referred to as a Maven project). Therefore, it expects to retrieve all dependent artifacts (JAR files) from the local Maven repository. If the artifact is missing from the local repository, it will be fetched remotely from the JBoss Maven repository and cached in the local repository.</para>
- <para>One option for executing the TCK the first time is to allow Maven fetch all required dependencies. If you want to use your own implementation of the TCK porting package, or if you are running the TCK against your own JSR-299 implementation, you need to install the cooresponding artifacts into your local Maven repository, at the very least. If you don't want to use Maven at all, you'll need to implement a project the executes the TCK runner from scratch. This guide assumes the use of the Maven project structure.</para>
+ <para>One option for executing the TCK the first time is to allow Maven fetch all required dependencies. If you want to use your own implementation of the TCK porting package, or if you are running the TCK against your own JSR-299 implementation, you need to install the corresponding artifacts into your local Maven repository, at the very least. If you don't want to use Maven at all, you'll need to implement a project the executes the TCK runner from scratch. This guide assumes the use of the Maven project structure.</para>
<para>If your JSR-299 implementation uses a Maven project structure, you can have Maven install the artifact into your local Maven repository in the normal way:</para>
<programlisting>mvn install</programlisting>
<para>If you are not using a Maven project structure, you can install each artifact into your local Maven respository using the install goal:</para>
@@ -72,7 +72,7 @@
<title>Eclipse plugins</title>
<para>Eclipse, or any other IDE, is not required to execute or pass the TCK. However, executing and debugging tests in the IDE is essential for a licensee attempting to get a JSR-299 implementation to pass the tests in the TCK test suite. This section introduces two essential Eclipse plugins and points you to resources explaining how to install them.</para>
<para>The TCK is built on the JBoss Test Harness, which is in turn executed by TestNG. Therefore, having the TestNG plugin installed in Eclipse is essential. Instructions for using the TestNG update site to add the TestNG plugin to Eclipse are provided on the TestNG <ulink url="http://testng.org/doc/download.html">download page</ulink>. You can find a tutorial that explains how to use the TestNG plugin on the TestNG <ulink url="http://testng.org/doc/eclipse.html">Eclipse page</ulink>.</para>
- <para>Another essential plugin is m2eclipse. Both the TCK project and the TCK runner project (at least the one that ships with the JSR-299 RI) are built with Maven 2. Therefore, to work with these projects in Eclipse, you need to have support for Maven 2 project, which the m2eclipse plugin provided. Instructions for using the m2eclipse update site to add the m2eclipse plugin to Eclipse are provided on the m2eclipse home page. Sonatype, the company that maintains the m2eclipse plugin and is a strong supporter of Maven, publishes an entire <ulink url="http://www.sonatype.com/books/m2eclipse-book/reference">reference guide</ulink> dedicated to the plugin on their website.</para>
+ <para>Another essential plugin is m2eclipse. Both the TCK project and the TCK runner project (at least the one that ships with the JSR-299 RI) are built with Maven 2. Therefore, to work with these projects in Eclipse, you need to have support for Maven 2 project, which the m2eclipse plugin provides. Instructions for using the m2eclipse update site to add the m2eclipse plugin to Eclipse are provided on the m2eclipse home page. Sonatype, the company that maintains the m2eclipse plugin and is a strong supporter of Maven, publishes an entire <ulink url="http://www.sonatype.com/books/m2eclipse-book/reference">reference guide</ulink> dedicated to the plugin on their website.</para>
</section>
</section>
</chapter>
Modified: tck/trunk/doc/reference/en-US/introduction.xml
===================================================================
--- tck/trunk/doc/reference/en-US/introduction.xml 2009-07-22 23:35:57 UTC (rev 3147)
+++ tck/trunk/doc/reference/en-US/introduction.xml 2009-07-23 08:55:04 UTC (rev 3148)
@@ -12,8 +12,8 @@
<section>
<title>Compatibility Testing</title>
<para>The goal of any specification is to eliminate portability problems so long as the program which uses the implementation also conforms to the rules laid out in the specification.</para>
- <para>Executing the TCK is a form of compatibility testing. It's important to understand that compatibility testing is distinctly different from product testing. The TCK is not concerned with robustness, performance or ease of use, and therefore cannot vouch for how well an implementation meets these criteria. What a TCK can do is ensure the exactness of an implementation as it relates to the specification.</para>
- <para>Compatibility testing of any feature relies on both a complete specification and a complete reference implementation. The reference implementation demonstrates how each test can be passed and provides additional context to the licensee during development for the cooresponding assertion.</para>
+ <para>Executing the TCK is a form of compatibility testing. It's important to understand that compatibility testing is distinctly different from product testing. The TCK is not concerned with robustness, performance or ease of use, and therefore cannot vouch for how well an implementation meets these criteria. What a TCK can do is to ensure the exactness of an implementation as it relates to the specification.</para>
+ <para>Compatibility testing of any feature relies on both a complete specification and a complete reference implementation. The reference implementation demonstrates how each test can be passed and provides additional context to the licensee during development for the corresponding assertion.</para>
<section>
<title>Why Compatibility Is Important</title>
<para>Java platform compatibility is important to different groups involved with Java technologies for
@@ -40,7 +40,7 @@
</para>
</listitem>
</itemizedlist>
- <para>The JSR-299 specification goes to great lengths to ensure that programs written for Java EE are compatible and the TCK is rigourous about enforcing the rules the specification lays down.</para>
+ <para>The JSR-299 specification goes to great lengths to ensure that programs written for Java EE are compatible and the TCK is rigorous about enforcing the rules the specification lays down.</para>
</section>
</section>
<section>
@@ -100,7 +100,7 @@
automatic running of tests through the JBoss Test harness.</para>
</listitem>
<listitem>
- <para><emphasis role="bold">JBoss TCK Runner</emphasis> - An implementation of hte JBoss Test Harness deployment APIs for deploying artifacts to JBoss AS 5.1</para>
+ <para><emphasis role="bold">JBoss TCK Runner</emphasis> - An implementation of the JBoss Test Harness deployment APIs for deploying artifacts to JBoss AS 5.1</para>
</listitem>
<listitem>
<para><emphasis role="bold">TCK documentation</emphasis> accompanied by release notes identifying updates between versions.</para>
@@ -136,7 +136,7 @@
<note>
<para>You'll often see the term <emphasis role="italic">in-container</emphasis> used in this reference guide. This term refers to running the test suite in any of the aforementioned environments, whilst <emphasis role="italic">standalone</emphasis> refers to running the tests outside the container via a JSR-299 implementation-specific standalone bootstrap. The standalone mode only runs those tests which don't require EJB, Servlet or JSF to be present.</para>
</note>
- <para>The last thing Java developers want is yet another testing framework to make their life more complicated. What they do want is good integration with the their Integrated Development Environment (IDE). These days, if a tool doesn't have an IDE plugin, then it won't get the attention it deserves. That's why the JBoss Test Harness is built entirely TestNG. TestNG is one of the two prominent test frameworks for Java and TestNG plugins are available for all major IDEs (with the exception of NetBeans) and build tools (Ant and Maven 2).</para>
+ <para>The last thing Java developers want is yet another testing framework to make their life more complicated. What they do want is a good integration with their Integrated Development Environment (IDE). These days, if a tool doesn't have an IDE plugin, then it won't get the attention it deserves. That's why the JBoss Test Harness is built entirely upon TestNG. TestNG is one of the two prominent test frameworks for Java and TestNG plugins are available for all major IDEs (with the exception of NetBeans) and build tools (Ant and Maven 2).</para>
<para>Because it leverages the existing TestNG ecosystem, there is no need for a special test launcher for the JBoss Test Harness, and in turn the JSR-299 TCK. You simply use the IDE or build tool of your choice. You also get reporting and debugging for free.</para>
<para>The JBoss Test Harness supports the following features:</para>
<itemizedlist>
@@ -175,11 +175,11 @@
<para>The <literal>@Test</literal> annotation is provided by TestNG, the <literal>@Artifact</literal> annotation is provided by the JBoss Test Harness and the <literal>AbstractJSR299Test</literal> is part of the JSR-299 TCK. There is a one-to-one mapping between a TestNG test class and an artifact. The packaging type is defined by the <literal>@org.jboss.testharness.impl.packaging.Packaging</literal> annotation on the test class, defaulting to a WAR if not specified.</para>
<para>Prior to executing the tests for a given class, the JBoss Test Harness packages the class as a deployable artifact (EAR or WAR), along with any extra resources specified, and deploys the artifact to the container. The test execution and results are negotatied via HTTP communication using a thin layer over the TestNG test launcher. The test harness can also catch and affirm expected deployment exceptions. This setup and tear down activity is provided by the super class <literal>org.jboss.jsr299.tck.AbstractJSR299Test</literal>, which all TCK test classes must extend.</para>
<para>If the annotation <literal>@org.jboss.testharness.impl.packaging.IntegrationTest</literal> is not present on the test class, then it means the test class can be executed in standalone mode. In standalone mode, the deployable artifact is assembled on the local classpath and the tests execute in the same JVM as the launcher, just as though it were a regular TestNG test case. The standalone mode is provided merely for convenience and efficiency.</para>
- <para>Chapter X details how to run the TCK test suite using the JBoss Test Harness.</para>
+ <para>Chapter 4 details how to run the TCK test suite using the JBoss Test Harness.</para>
</section>
<section>
<title>The Porting Package</title>
- <para>The JSR-299 TCK relies on an implemnetation of the porting package to function. The porting package can be divided into two parts. The first part is comprised of extensions to the JSR-299 SPIs to allow testing of a container. The second part must contain implementations of the JBoss Test Harness deployment APIs for deploying test artifacts to a given container.</para>
+ <para>The JSR-299 TCK relies on an implementation of the porting package to function. The porting package can be divided into two parts. The first part is comprised of extensions to the JSR-299 SPIs to allow testing of a container. The second part must contain implementations of the JBoss Test Harness deployment APIs for deploying test artifacts to a given container.</para>
<para>As mentioned earlier, there are times when the tests need to tap directly into the JSR-299 implementation to manipulate behavior or verify results. The porting package includes a set of SPIs that provide the TCK this level of access without tying the tests to a given implementation.</para>
<para>The four SPI classes in the JSR-299 TCK are as follows:</para>
<itemizedlist>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3147 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/context/conversation/client and 25 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-22 19:35:57 -0400 (Wed, 22 Jul 2009)
New Revision: 3147
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeployElements/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/broken/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/NameDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithWildcardedEventTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/broken/parameterAnnotatedObserves/ParameterAnnotatedObservesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/ParameterAnnotatedDisposesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/IndirectOverrideTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/SpecializesStaticMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/SimpleBeanSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/SpecializingBeanImplementsInterfaceOnly.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/SpecializingBeanExtendsNothingTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/SpecializingClassExtendsNonSimpleBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
matched remaining unmatched tests to assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -42,13 +42,6 @@
assert getBeans(Conversation.class).iterator().next().getScopeType().equals(RequestScoped.class);
}
- @Test(groups = { "contexts", "rewrite" })
- @SpecAssertion(section = "6.7.5", id = "ic")
- public void testBeanWithDeploymentTypeStandard()
- {
- assert getBeans(Conversation.class).iterator().next().getDeploymentType().equals(Standard.class);
- }
-
@Test(groups = { "contexts" })
@SpecAssertion(section = "6.7.5", id = "id")
public void testBeanWithBindingCurrent()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -124,7 +124,7 @@
}
@Test(groups = { "contexts" })
- @SpecAssertion(section = "6.7.4", id = "s")
+ @SpecAssertion(section = "6.7.4", id = "tb")
public void testConversationPropagationToNonExistentConversationLeadsToTransientConversation() throws Exception
{
HttpClient client = new HttpClient();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -173,7 +173,7 @@
@Test(groups = { "contexts", "disposalMethod" })
@SpecAssertions({
@SpecAssertion(section = "6.4", id = "g"),
- @SpecAssertion(section = "11.1", id = "a")
+ @SpecAssertion(section = "11.1", id = "aa")
})
public void testContextIsActiveWhenInvokingDisposalMethod()
{
@@ -225,7 +225,7 @@
@Test(groups = { "contexts", "beanDestruction"})
@SpecAssertions({
- @SpecAssertion(section = "6.4.2", id = "aaa"),
+ @SpecAssertion(section = "6.4.2", id = "aaaa"),
@SpecAssertion(section = "6.4", id = "b")
})
public void testDestroyingSimpleParentDestroysDependents()
@@ -244,7 +244,7 @@
@Test(groups = { "contexts", "beanDestruction"})
@SpecAssertions({
- @SpecAssertion(section = "6.4.2", id = "aaa"),
+ @SpecAssertion(section = "6.4.2", id = "aaaa"),
@SpecAssertion(section = "6.4", id = "b")
})
public void testDestroyingManagedParentDestroysDependentsOfSameBean()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -39,13 +39,13 @@
assert !beans.isEmpty();
}
- @Test @SpecAssertion(section="review", id = "review")
+ @Test @SpecAssertion(section="6.6.2", id = "c")
public void testInjectionOfDependentPrimitiveProductIntoNormalBean()
{
getInstanceByType(NumberConsumer.class).ping();
}
- @Test @SpecAssertion(section="6.6.2", id = "6.6.2")
+ @Test @SpecAssertion(section="6.6.2", id = "c")
public void testInjectionOfDependentSerializableProductIntoNormalBean()
{
getInstanceByType(SerializableCityConsumer.class).ping();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/NameDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/NameDefinitionTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/NameDefinitionTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -33,7 +33,7 @@
@Test
@SpecAssertions({
@SpecAssertion(section= "2.5.2", id = "a"),
- @SpecAssertion(section = "3.2.6", id = "a"),
+ @SpecAssertion(section = "3.1.6", id = "a"),
@SpecAssertion(section = "2.5.1", id = "d")
})
public void testDefaultNamed()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -158,7 +158,7 @@
@SpecAssertions({
@SpecAssertion(section = "10.5", id = "aa"),
@SpecAssertion(section = "10.4.2", id = "a"),
- @SpecAssertion(section = "12.3", id = "o")
+ @SpecAssertion(section = "12.3", id = "oa")
})
public void testObserverMethodAutomaticallyRegistered()
{
@@ -235,7 +235,7 @@
@Test(groups = { "events" })
@SpecAssertions( {
@SpecAssertion(section = "10.4.4", id = "a"),
- @SpecAssertion(section = "5.6.8", id = "b")
+ @SpecAssertion(section = "5.6.8", id = "ba")
} )
public void testConditionalObserver()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithWildcardedEventTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithWildcardedEventTypeTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithWildcardedEventTypeTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -25,7 +25,7 @@
* Tests an observer method defined to observe an event type which
* is generic and wildcarded.
*
- * Spec version: 20090610
+ * Spec version: 20090625
*
* @author David Allen
*/
@@ -33,7 +33,7 @@
public class ObserverMethodWithWildcardedEventTypeTest extends AbstractJSR299Test
{
@Test(groups = { "events", "ri-broken" })
- @SpecAssertion(section = "10.5.1", id = "ca")
+ @SpecAssertion(section = "10.4.1", id = "ca")
public void testObserverMethodCanObserveParameterizedEvents()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -34,7 +34,7 @@
*
* @author David Allen
*
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@Packaging(PackagingType.EAR)
@@ -45,8 +45,8 @@
@Test(groups = { "enterpriseBeans", "ejbjarxml" })
@SpecAssertions( {
- @SpecAssertion(section = "3.2.1", id = "n"),
- @SpecAssertion(section = "3.3.2", id = "ba")
+ @SpecAssertion(section = "3.1.1", id = "n"),
+ @SpecAssertion(section = "3.2.2", id = "ba")
})
public void testEjbDeclaredInXmlNotSimpleBean()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/broken/parameterAnnotatedObserves/ParameterAnnotatedObservesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/broken/parameterAnnotatedObserves/ParameterAnnotatedObservesTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/broken/parameterAnnotatedObserves/ParameterAnnotatedObservesTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -1,6 +1,5 @@
package org.jboss.jsr299.tck.tests.implementation.initializer.broken.parameterAnnotatedObserves;
-
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DefinitionError;
@@ -8,14 +7,17 @@
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090625
+ *
+ */
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
public class ParameterAnnotatedObservesTest extends AbstractJSR299Test
{
-
-
@Test(groups = "initializerMethod")
- @SpecAssertion(section = "3.9.1", id = "d")
+ @SpecAssertion(section = "3.8.1", id = "da")
public void testInitializerMethodHasParameterAnnotatedObserves()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -13,7 +13,7 @@
/**
*
- * Spec version: 20090519
+ * Spec version: 20090625
*
*/
@Artifact
@@ -23,8 +23,8 @@
{
@Test
@SpecAssertions({
- @SpecAssertion(section = "3.4.2", id = "fa"),
- @SpecAssertion(section = "3.4", id = "d")
+ @SpecAssertion(section = "3.3.2", id = "fa"),
+ @SpecAssertion(section = "3.3", id = "d")
})
public void testProducerMethodOnSessionBeanMustBeBusinessMethod()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/ParameterAnnotatedDisposesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/ParameterAnnotatedDisposesTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/ParameterAnnotatedDisposesTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -10,7 +10,7 @@
/**
*
- * Spec version: 20090519
+ * Spec version: 20090625
*
*/
@Artifact
@@ -20,7 +20,7 @@
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "da")
+ @SpecAssertion(section = "3.3.2", id = "da")
public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -132,7 +132,7 @@
@Test(groups = "injection")
@SpecAssertions({
- @SpecAssertion(section = "7.3.1", id = "c"),
+ @SpecAssertion(section = "7.3.1", id = "aa"),
@SpecAssertion(section = "3.7.1", id = "a")
})
public void testCreateInjectsFieldsDeclaredInJava()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -49,10 +49,7 @@
@Test
- @SpecAssertions({
- @SpecAssertion(section="4.3.2", id = "a"),
- @SpecAssertion(section="4.3.1", id ="cb")
- })
+ @SpecAssertion(section="4.3.2", id = "a")
public void testProducerMethodOnSpecializedBeanCalledOnSpecializingBean() throws Exception
{
new RunInDependentContext()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -11,7 +11,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@Packaging(PackagingType.EAR)
@@ -20,7 +20,12 @@
public class TwoBeansSpecializeTheSameBeanTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section="4.3.3", id = "ba")
+ //@SpecAssertion(section="4.3.3", id = "ba")
+ @SpecAssertion(section = "review", id = "review") // removed from spec? was:
+ // If, in a particular deployment, more than one enabled bean directly specializes
+ // the same bean, the container automatically detects inconsistent specialization
+ // and treats it as a deployment problem, as defined in Section 12.4, "Problems
+ // detected automatically by the container"
public void testTwoBeansSpecializeTheSameBean()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/IndirectOverrideTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/IndirectOverrideTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/IndirectOverrideTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -9,7 +9,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
@@ -17,7 +17,7 @@
{
@Test
- @SpecAssertion(section="3.4.4", id = "ca")
+ @SpecAssertion(section="3.3.4", id = "ca")
public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/SpecializesStaticMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/SpecializesStaticMethodTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/SpecializesStaticMethodTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -9,7 +9,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
@@ -17,7 +17,7 @@
{
@Test
- @SpecAssertion(section="3.4.4", id = "ba")
+ @SpecAssertion(section="3.3.4", id = "ba")
public void testSpecializedStaticMethod()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -8,7 +8,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DeploymentError.class)
@@ -16,7 +16,12 @@
{
@Test
- @SpecAssertion(section="4.3.3", id = "ba")
+ //@SpecAssertion(section="4.3.3", id = "ba")
+ @SpecAssertion(section = "review", id = "review") // removed from spec? was:
+ // If, in a particular deployment, more than one enabled bean directly specializes
+ // the same bean, the container automatically detects inconsistent specialization
+ // and treats it as a deployment problem, as defined in Section 12.4, "Problems
+ // detected automatically by the container"
public void testTwoBeansSpecializeTheSameBean()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/SimpleBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/SimpleBeanSpecializationTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/SimpleBeanSpecializationTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -14,7 +14,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*
*/
@Artifact
@@ -31,7 +31,7 @@
@SpecAssertions( {
@SpecAssertion(section = "4.3.1", id = "i"),
@SpecAssertion(section = "4.3.1", id = "j"),
- @SpecAssertion(section = "3.2.5", id = "aa")
+ @SpecAssertion(section = "3.1.5", id = "aa")
})
public void testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()
{
@@ -45,7 +45,7 @@
@Test
@SpecAssertions( {
@SpecAssertion(section = "4.3.1", id = "k"),
- @SpecAssertion(section = "3.2.5", id = "aa")
+ @SpecAssertion(section = "3.1.5", id = "aa")
})
public void testSpecializingBeanHasNameOfSpecializedBean()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -11,7 +11,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@Packaging(PackagingType.EAR)
@@ -19,7 +19,7 @@
public class SpecializingBeanExtendsEnterpriseBeanTest extends AbstractJSR299Test
{
@Test(groups = { "specialization" })
- @SpecAssertion(section = "3.2.5", id = "aa")
+ @SpecAssertion(section = "3.1.5", id = "aa")
public void testSpecializingClassDirectlyExtendsEnterpriseBean()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/SpecializingBeanImplementsInterfaceOnly.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/SpecializingBeanImplementsInterfaceOnly.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/SpecializingBeanImplementsInterfaceOnly.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -9,14 +9,14 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
public class SpecializingBeanImplementsInterfaceOnly extends AbstractJSR299Test
{
@Test(groups = { "specialization" })
- @SpecAssertion(section = "3.2.5", id = "da")
+ @SpecAssertion(section = "3.1.5", id = "da")
public void testSpecializingClassImplementsInterfaceAndExtendsNothing()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/SpecializingBeanExtendsNothingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/SpecializingBeanExtendsNothingTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/SpecializingBeanExtendsNothingTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -9,14 +9,14 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
public class SpecializingBeanExtendsNothingTest extends AbstractJSR299Test
{
@Test(groups = { "specialization" })
- @SpecAssertion(section = "3.2.5", id = "da")
+ @SpecAssertion(section = "3.1.5", id = "da")
public void testSpecializingClassDirectlyExtendsNothing()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/SpecializingClassExtendsNonSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/SpecializingClassExtendsNonSimpleBeanTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/SpecializingClassExtendsNonSimpleBeanTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -9,14 +9,14 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
public class SpecializingClassExtendsNonSimpleBeanTest extends AbstractJSR299Test
{
@Test(groups = { "specialization" })
- @SpecAssertion(section = "3.2.5", id = "da")
+ @SpecAssertion(section = "3.1.5", id = "da")
public void testSpecializingClassExtendsNonSimpleBean()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java 2009-07-22 23:35:57 UTC (rev 3147)
@@ -8,14 +8,19 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DeploymentError.class)
public class TwoSpecializingBeansForOneSpecializedTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section="4.3.3", id="ba")
+ //@SpecAssertion(section="4.3.3", id = "ba")
+ @SpecAssertion(section = "review", id = "review") // removed from spec? was:
+ // If, in a particular deployment, more than one enabled bean directly specializes
+ // the same bean, the container automatically detects inconsistent specialization
+ // and treats it as a deployment problem, as defined in Section 12.4, "Problems
+ // detected automatically by the container"
public void testTwoBeansSpecializeTheSameBean()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 22:49:01 UTC (rev 3146)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 23:35:57 UTC (rev 3147)
@@ -1618,13 +1618,13 @@
<section id="4.3.2" title="Most specialized enabled bean for a bean">
<assertion id="a">
- <text>Non-static producer methods, ~producer fields, disposal methods and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text><assertion id="b">
+ <text>Non-static producer methods, ~producer fields, disposal methods and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
+ </assertion>
+
+ <assertion id="b">
<text>Non-static ~producer methods,~ producer fields~, disposal methods and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
- </assertion>
- </assertion>
+ </assertion>
-
-
<assertion id="c">
<text>Non-static ~producer methods, producer fields,~ disposal methods~ and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
</assertion>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3146 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: deployment/lifecycle and 12 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-22 18:49:01 -0400 (Wed, 22 Jul 2009)
New Revision: 3146
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithTypeVariableEventTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/initializerUnallowed/InitializerUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/ObserverParameterUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
Log:
matched miscellaneous tests with latest spec assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -18,7 +18,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@BeansXml("beans.xml")
@@ -36,7 +36,8 @@
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.1.1", id = "aa"), @SpecAssertion(section = "2.4.3", id = "c") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.1.1", id = "aa"),
+ @SpecAssertion(section = "2.4.3", id = "c") })
public void testStereotypeWithScopeType()
{
assert getBeans(Moose.class).size() == 1;
@@ -44,7 +45,8 @@
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.1.1", id = "aa"), @SpecAssertion(section = "2.4.4", id = "b") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.1.1", id = "aa"),
+ @SpecAssertion(section = "2.4.4", id = "b") })
public void testStereotypeWithoutScopeType()
{
assert getBeans(Reindeer.class).size() == 1;
@@ -60,7 +62,8 @@
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), @SpecAssertion(section = "2.7", id = "d") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.7", id = "d") })
public void testMultipleStereotypesAllowed()
{
assert getBeans(HighlandCow.class, TAME_LITERAL).size() == 1;
@@ -71,7 +74,8 @@
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), @SpecAssertion(section = "2.4.4", id = "e") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.4.4", id = "e") })
public void testExplicitScopeOverridesMergedScopesFromMultipleStereotype()
{
assert getBeans(Springbok.class).size() == 1;
@@ -90,7 +94,10 @@
public void testStereotypeNotDeclaredInheritedIsNotInherited()
{
assert getBeans(ShetlandPony.class).size() == 1;
- assert getBeans(ShetlandPony.class).iterator().next().getDeploymentType().equals(Production.class);
+
+ // rewrite this to not test deployment type
+ //assert getBeans(ShetlandPony.class).iterator().next().getDeploymentType().equals(Production.class);
+ assert false;
}
@Test
@@ -101,14 +108,14 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "daa")
+ @SpecAssertion(section = "4.1", id = "hhh")
public void testStereotypeScopeIsOverriddenByInheritedScope()
{
assert getBeans(Chihuahua.class).iterator().next().getScopeType().equals(SessionScoped.class);
}
@Test
- @SpecAssertion(section = "4.1", id = "dca")
+ @SpecAssertion(section = "4.1", id = "hhi")
public void testStereotypeScopeIsOverriddenByIndirectlyInheritedScope()
{
assert getBeans(MexicanChihuahua.class).iterator().next().getScopeType().equals(SessionScoped.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -30,6 +30,7 @@
/**
* @author pmuir
*
+ * Spec version: 20090625
*/
@Artifact
@Resources({
@@ -47,7 +48,8 @@
}
@Test
- @SpecAssertion(section="11.5.1", id="ba")
+ //@SpecAssertion(section="11.5.1", id="ba")
+ @SpecAssertion(section="review", id="review")
public void testAddingBindingType()
{
assert BeforeBeanDiscoveryObserver.isObserved();
@@ -56,7 +58,8 @@
}
@Test
- @SpecAssertion(section="11.5.1", id="bb")
+ //@SpecAssertion(section="11.5.1", id="bb")
+ @SpecAssertion(section="review", id="review")
public void testAddingScopeType()
{
assert BeforeBeanDiscoveryObserver.isObserved();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -13,7 +13,7 @@
* Tests that any definition error added by an observer of the AfterBeanDiscovery
* event results in a definition error.
*
- * Spec version: 20090519
+ * Spec version: 20090625
*
* @author David Allen
* @author Dan Allen
@@ -29,7 +29,7 @@
{
@Test
//TODO This test is not working in container due to exceptions being unwound on the server
- @SpecAssertion(section = "11.5.2", id = "c")
+ @SpecAssertion(section = "11.5.2", id = "ca")
public void testObserverDefinitionErrorTreatedAsDefinitionError()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -28,6 +28,8 @@
/**
* @author pmuir
+ *
+ * Spec version: 20090625
*
*/
@Artifact
@@ -40,7 +42,8 @@
{
@Test(groups="incontainer-ri-broken")
- @SpecAssertion(section="11.5.1", id="c")
+ //@SpecAssertion(section="11.5.1", id="c")
+ @SpecAssertion(section="review", id="review")
public void testThrowsException()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -28,6 +28,8 @@
/**
* @author pmuir
+ *
+ * Spec version: 20090625
*
*/
@Artifact
@@ -40,7 +42,8 @@
{
@Test
- @SpecAssertion(section="11.5.1", id="bb")
+ //@SpecAssertion(section="11.5.1", id="bb")
+ @SpecAssertion(section="review", id="review")
public void testAddingScopeType()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -29,6 +29,7 @@
/**
* @author pmuir
*
+ * Spec version: 20090625
*/
@Artifact
@Resources({
@@ -41,7 +42,8 @@
{
@Test
- @SpecAssertion(section="11.5.1", id="bb")
+ //@SpecAssertion(section="11.5.1", id="bb")
+ @SpecAssertion(section="review", id="review")
public void testAddingScopeType()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithTypeVariableEventTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithTypeVariableEventTypeTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/ObserverMethodWithTypeVariableEventTypeTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -29,7 +29,7 @@
* Tests an observer method defined to observe an event type which
* is generic and wildcarded.
*
- * Spec version: 20090610
+ * Spec version: 20090625
*
* @author David Allen
*/
@@ -38,7 +38,7 @@
public class ObserverMethodWithTypeVariableEventTypeTest extends AbstractJSR299Test
{
@Test(groups = { "events", "ri-broken" })
- @SpecAssertion(section = "10.5.1", id = "cb")
+ @SpecAssertion(section = "10.4.1", id = "cb")
public void testObserverMethodCanObserveParameterizedEvents()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -12,7 +12,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
public class ResolvingChecksBindingTypeMembersTest extends AbstractJSR299Test
@@ -43,9 +43,9 @@
@Test(groups = { "events" })
@SpecAssertions({
- @SpecAssertion(section = "10.5.1", id = "a"),
- @SpecAssertion(section = "10.2.1", id = "a"),
- @SpecAssertion(section = "10.2.1", id = "b")
+ @SpecAssertion(section = "10.4.1", id = "a"),
+ @SpecAssertion(section = "10.2.2", id = "a"),
+ @SpecAssertion(section = "10.2.2", id = "b")
})
public void testResolvingChecksBindingTypeMembers()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -11,7 +11,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
public class ChecksEventTypeWhenResolvingTest extends AbstractJSR299Test
@@ -31,7 +31,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "10.5.1", id = "a")
+ @SpecAssertion(section = "10.4.1", id = "a")
public void testResolvingChecksEventType()
{
assert !getCurrentManager().resolveObserverMethods(new AnEventType()).isEmpty();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/initializerUnallowed/InitializerUnallowedDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/initializerUnallowed/InitializerUnallowedDefinitionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/initializerUnallowed/InitializerUnallowedDefinitionTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -10,7 +10,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
@@ -18,7 +18,7 @@
public class InitializerUnallowedDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.7", id = "da")
+ @SpecAssertion(section = "3.3.7", id = "da")
public void testInitializerUnallowed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/ObserverParameterUnallowedDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/ObserverParameterUnallowedDefinitionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/ObserverParameterUnallowedDefinitionTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -9,7 +9,7 @@
import org.testng.annotations.Test;
/**
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
@@ -17,7 +17,7 @@
public class ObserverParameterUnallowedDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.7", id = "ea")
+ @SpecAssertion(section = "3.3.7", id = "ea")
public void testObserverParameterUnallowed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -12,19 +12,17 @@
/**
*
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
@Packaging(PackagingType.EAR)
public class SingletonWithSessionScopeTest extends AbstractJSR299Test
{
-
@Test(groups = { "incontainer-broken" })
- @SpecAssertion(section = "3.3", id = "da")
+ @SpecAssertion(section = "3.2", id = "da")
public void testSingletonWithSessionScopeFails()
{
assert false;
}
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -10,21 +10,20 @@
/**
*
- * Spec version: 20090519
+ * Spec version: 20090625
*
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
public class ParameterizedReturnTypeWithWildcardTest extends AbstractJSR299Test
{
-
-
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5", id = "ga")
+ @SpecAssertion(section = "3.4", id = "ga")
public void testParameterizedReturnTypeWithWildcard()
{
assert false;
}
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-07-22 22:49:01 UTC (rev 3146)
@@ -131,7 +131,7 @@
@Test(groups = "producerMethod")
@SpecAssertions({
@SpecAssertion(section = "3.3.1", id = "b"),
- @SpecAssertion(section = "2.2", id = "j")
+ @SpecAssertion(section = "2.2.1", id = "i")
})
public void testApiTypeForArrayTypeReturn() throws Exception
{
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3145 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb and 7 other directories.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-22 16:12:03 -0400 (Wed, 22 Jul 2009)
New Revision: 3145
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Monitor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/Greeting.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/GreetingBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/ResourceProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/Default.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ManagedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ResourceProducer.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/beans.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/web.xml
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbInterface.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/SimpleBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/SimpleBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/SimpleBean.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/web.xml
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/Another.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/beans.xml
Log:
reimplement the EE resources test to use the producer field pattern
bring assertions up to 20090625 spec
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+public interface AnotherInterface
+{
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -9,7 +9,7 @@
* 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,
+ * 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.
@@ -17,10 +17,15 @@
package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
@@ -34,10 +39,9 @@
/**
* EJB injection tests for simple beans.
*
- * Spec version: 20090519
+ * Spec version: 20090625
*
* @author David Allen
- *
*/
@Artifact
@Packaging(PackagingType.EAR)
@@ -48,15 +52,54 @@
@BeansXml("beans.xml")
public class EjbInjectionTest extends AbstractJSR299Test
{
- @Test(groups = { "ri-broken", "beanLifecycle", "commonAnnotations", "integration" })
- @SpecAssertion(section = "3.6.1", id = "ee")
+ @Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertions({
+ @SpecAssertion(section = "3.5.1", id = "ee")
+ })
public void testInjectionOfEjbs()
{
- Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
- CreationalContext<SimpleBean> creationalContext = getCurrentManager().createCreationalContext(simpleBeanBean);
- SimpleBean simpleBean = simpleBeanBean.create(creationalContext);
- assert !simpleBean.isMyEjbExists() : "Ejb was injected too early";
- assert simpleBean.getMyEjb() != null : "Ejb was not injected into bean";
- assert simpleBean.getMyEjb().hello().equals("hi!");
+ Bean<ManagedBean> managedBean = getBeans(ManagedBean.class).iterator().next();
+ CreationalContext<ManagedBean> creationalContext = getCurrentManager().createCreationalContext(managedBean);
+ ManagedBean instance = managedBean.create(creationalContext);
+ assert instance.getMyEjb() != null : "EJB reference was not produced and injected into bean";
+ assert instance.getMyEjb().knockKnock().equals("We're home");
}
+
+ // Marked as review because I think the EJB proxy should have the AnotherInterface interface
+ // also, need to verify that the instance is passivation capable
+ @Test(groups = { "beanLifecycle", "commonsAnnotations", "integration", "review" })
+ @SpecAssertions({
+ @SpecAssertion(section = "7.3.6", id = "l"),
+ @SpecAssertion(section = "7.3.6", id = "m"),
+ @SpecAssertion(section = "7.3.6", id = "o")
+ })
+ public void testProduceEjbProxyWithContainerInjections()
+ {
+ Bean<RemoteEjb> remoteEjbBean = getBeans(RemoteEjb.class).iterator().next();
+ CreationalContext<RemoteEjb> remoteEjbCc = getCurrentManager().createCreationalContext(remoteEjbBean);
+ RemoteEjb instance = remoteEjbBean.create(remoteEjbCc);
+ assert instance != null;
+
+ instance.knockKnock();
+ assert instance.getKnocks() == 1;
+
+ //assert getCurrentConfiguration().getBeans().isProxy(instance);
+ Set<Class> interfaces = new HashSet<Class>(Arrays.asList(instance.getClass().getInterfaces()));
+ assert interfaces.contains(RemoteEjb.class);
+ //assert interfaces.contains(AnotherInterface.class);
+ }
+
+ @Test(groups = { "beanLifecycle", "commonsAnnotations", "integration" })
+ @SpecAssertion(section = "7.3.6", id = "na")
+ public void testRemoveProducedEjbProxy()
+ {
+ Monitor monitor = getInstanceByType(Monitor.class);
+ Bean<RemoteEjb> remoteEjbBean = getBeans(RemoteEjb.class).iterator().next();
+ CreationalContext<RemoteEjb> remoteEjbCc = getCurrentManager().createCreationalContext(remoteEjbBean);
+ RemoteEjb instance = remoteEjbBean.create(remoteEjbCc);
+ instance.knockKnock();
+ remoteEjbBean.destroy(instance, remoteEjbCc);
+ // QUESTION is this the right assertion?
+ assert !monitor.isRemoteEjbDestroyed();
+ }
}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java (from rev 3118, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/SimpleBean.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+import javax.enterprise.inject.Current;
+
+class ManagedBean
+{
+ private @Current RemoteEjb myEjb;
+
+ public RemoteEjb getMyEjb()
+ {
+ return myEjb;
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Monitor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Monitor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Monitor.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped class Monitor implements Serializable
+{
+ private boolean remoteEjbDestroyed = false;
+
+ public void remoteEjbDestroyed()
+ {
+ remoteEjbDestroyed = true;
+ }
+
+ public boolean isRemoteEjbDestroyed()
+ {
+ return remoteEjbDestroyed;
+ }
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,14 +0,0 @@
-package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
-
-import javax.ejb.Stateless;
-
-@Stateless(name="MyRemoteEjb", mappedName="ejb/MyRemoteEjb")
-public class RemoteEjb implements RemoteEjbInterface
-{
-
- public String hello()
- {
- return "hi!";
- }
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java (from rev 3118, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbInterface.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+import javax.ejb.Remote;
+
+public @Remote interface RemoteEjb extends AnotherInterface
+{
+ public String knockKnock();
+
+ public int getKnocks();
+
+ public boolean isUserTransactionInjected();
+
+ public void cleanup();
+
+ public void dispose();
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java (from rev 3118, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjb.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,59 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
+import javax.enterprise.inject.Current;
+import javax.transaction.SystemException;
+import javax.transaction.UserTransaction;
+
+public
+@Stateful(name="SampleRemoteEjb", mappedName="ejb/SampleRemoteEjb")
+(a)TransactionManagement(TransactionManagementType.BEAN)
+class RemoteEjbBean implements RemoteEjb
+{
+ private int knocks = 0;
+
+ private @Current Monitor monitor;
+
+ private @Resource UserTransaction transaction;
+
+ public String knockKnock()
+ {
+ knocks++;
+ return "We're home";
+ }
+
+ public int getKnocks()
+ {
+ return knocks;
+ }
+
+ public boolean isUserTransactionInjected()
+ {
+ try
+ {
+ if (transaction != null)
+ {
+ transaction.getStatus();
+ return true;
+ }
+ }
+ catch (SystemException e)
+ {
+ }
+ return false;
+ }
+
+ public @PreDestroy void cleanup()
+ {
+ monitor.remoteEjbDestroyed();
+ }
+
+ public @Remove void dispose()
+ {
+ }
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbInterface.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbInterface.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface RemoteEjbInterface
-{
- public String hello();
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+import javax.ejb.EJB;
+import javax.enterprise.inject.Produces;
+
+class ResourceProducer
+{
+ private @Produces @EJB RemoteEjb remoteEjb;
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/SimpleBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/SimpleBean.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/SimpleBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,25 +0,0 @@
-package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
-
-import javax.ejb.EJB;
-
-class SimpleBean
-{
- @EJB
- private RemoteEjb myEjb;
- private boolean myEjbExists;
-
- public SimpleBean()
- {
- myEjbExists = myEjb != null;
- }
-
- public RemoteEjb getMyEjb()
- {
- return myEjb;
- }
-
- public boolean isMyEjbExists()
- {
- return myEjbExists;
- }
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,73 @@
+/*
+ * 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.implementation.simple.resource.env;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.enterprise.inject.spi.Bean;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ * Environment variable injection tests for simple beans.
+ *
+ * Spec version: 20090625
+ *
+ * @author Dan Allen
+ */
+@Artifact
+(a)Packaging(PackagingType.WAR)
+@IntegrationTest
+@Resource(source="web.xml", destination="/WEB-INF/web.xml")
+@BeansXml("beans.xml")
+public class EnvInjectionTest extends AbstractJSR299Test
+{
+ @Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertion(section = "3.5.1", id = "bb")
+ public void testInjectionOfEnv()
+ {
+ Bean<GreetingBean> greetingBean = getBeans(GreetingBean.class).iterator().next();
+ CreationalContext<GreetingBean> greetingBeanCc = getCurrentManager().createCreationalContext(greetingBean);
+ GreetingBean instance = greetingBean.create(greetingBeanCc);
+ assert instance.greet() != null;
+ assert instance.greet().equals("Hello there my friend");
+ }
+
+ @Test(groups = { "beanLifecycle", "commonsAnnotations", "integration" })
+ @SpecAssertions({
+ @SpecAssertion(section = "7.3.6", id = "l"),
+ @SpecAssertion(section = "7.3.6", id = "m"),
+ @SpecAssertion(section = "7.3.6", id = "o")
+ })
+ public void testProduceEnvProxy()
+ {
+ Bean<String> greetingEnvBean = getBeans(String.class, new AnnotationLiteral<Greeting>() {}).iterator().next();
+ CreationalContext<String> greetingEnvCc = getCurrentManager().createCreationalContext(greetingEnvBean);
+ String greeting = greetingEnvBean.create(greetingEnvCc);
+ assert greeting != null;
+ assert greeting.equals("Hello there my friend");
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/Greeting.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/Greeting.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/Greeting.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.env;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Greeting
+{
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/GreetingBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/GreetingBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/GreetingBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.env;
+
+class GreetingBean
+{
+ private @Greeting String phrase;
+
+ public String greet()
+ {
+ return phrase;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/ResourceProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/ResourceProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/ResourceProducer.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.env;
+
+import javax.annotation.Resource;
+import javax.enterprise.inject.Produces;
+
+class ResourceProducer
+{
+ private @Produces @Resource(name = "greeting") @Greeting String greeting;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/Default.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/Default.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/Default.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Default
+{
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java (from rev 3118, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/SimpleBean.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+class ManagedBean
+{
+ private @Default EntityManager persistenceContext;
+
+ private @Default EntityManagerFactory persistenceUnit;
+
+ public EntityManager getPersistenceContext()
+ {
+ return persistenceContext;
+ }
+
+ public EntityManagerFactory getPersistenceUnit()
+ {
+ return persistenceUnit;
+ }
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -2,8 +2,6 @@
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
@@ -13,54 +11,47 @@
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
/**
* Injection of persistence related objects.
*
- * Spec version: 20090519
+ * Spec version: 20090625
*
* @author David Allen
- *
*/
@Artifact
@Packaging(PackagingType.WAR)
@IntegrationTest
-@Resources({
- @Resource(source="persistence.xml", destination="WEB-INF/persistence.xml")
-})
+@Resource(source = "persistence.xml", destination = "WEB-INF/classes/META-INF/persistence.xml")
+//@PersistenceXml("persistence.xml")
@BeansXml("beans.xml")
public class PersistenceContextInjectionTest extends AbstractJSR299Test
{
@Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
- @SpecAssertions( {
- @SpecAssertion(section = "3.6.1", id = "cc")
+ @SpecAssertions( {
+ @SpecAssertion(section = "3.5.1", id = "cc")
})
public void testInjectionOfPersistenceContext()
{
- Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
- CreationalContext<SimpleBean> creationalContext = getCurrentManager().createCreationalContext(simpleBeanBean);
- SimpleBean simpleBean = simpleBeanBean.create(creationalContext);
- EntityManager entityManager = simpleBean.getPersistenceContext();
- assert !simpleBean.isPersistenceContextExistsDuringConstruction() : "Persistence context injected too early";
- assert entityManager != null : "Persistence context was not injected into bean";
- assert entityManager.isOpen() : "persistence context not open injected into bean";
+ Bean<ManagedBean> managedBeanBean = getBeans(ManagedBean.class).iterator().next();
+ CreationalContext<ManagedBean> managedBeanCc = getCurrentManager().createCreationalContext(managedBeanBean);
+ ManagedBean managedBean = managedBeanBean.create(managedBeanCc);
+ assert managedBean.getPersistenceContext() != null : "Persistence context was not injected into bean";
+ assert managedBean.getPersistenceContext().isOpen() : "Persistence context not open injected into bean";
}
- @Test(groups = { "broken", "beanLifecycle", "commonAnnotations", "integration" })
- @SpecAssertions( {
- @SpecAssertion(section = "3.6.1", id = "dd")
+ @Test(groups = { "ri-broken", "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertions( {
+ @SpecAssertion(section = "3.5.1", id = "dd")
})
public void testInjectionOfPersistenceUnit()
{
- Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
- CreationalContext<SimpleBean> creationalContext = getCurrentManager().createCreationalContext(simpleBeanBean);
- SimpleBean simpleBean = simpleBeanBean.create(creationalContext);
- EntityManagerFactory entityManagerFactory = simpleBean.getPersistenceUnit();
- assert !simpleBean.isPersistenceUnitExistsDuringConstruction() : "Persistence unit injected too early";
- assert entityManagerFactory != null : "Persistence unit was not injected into bean";
- assert entityManagerFactory.isOpen() : "persistence unit not open injected into bean";
+ Bean<ManagedBean> managedBeanBean = getBeans(ManagedBean.class).iterator().next();
+ CreationalContext<ManagedBean> managedBeanCc = getCurrentManager().createCreationalContext(managedBeanBean);
+ ManagedBean managedBean = managedBeanBean.create(managedBeanCc);
+ assert managedBean.getPersistenceUnit() != null : "Persistence unit was not injected into bean";
+ assert managedBean.getPersistenceUnit().isOpen() : "Persistence unit not open injected into bean";
}
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext;
+
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.PersistenceContext;
+import javax.persistence.PersistenceUnit;
+
+class ResourceProducer
+{
+ private @Produces @Default @PersistenceUnit EntityManagerFactory persistenceUnit;
+
+ private @Produces @Default @PersistenceContext EntityManager persistenceContext;
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/SimpleBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/SimpleBean.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/SimpleBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,43 +0,0 @@
-package org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceUnit;
-
-class SimpleBean
-{
- @PersistenceContext
- private EntityManager persistenceContext;
- private boolean persistenceContextExistsDuringConstruction;
-
- @PersistenceUnit
- private EntityManagerFactory persistenceUnit;
- private boolean persistenceUnitExistsDuringConstruction;
-
- public SimpleBean()
- {
- persistenceContextExistsDuringConstruction = persistenceContext != null;
- persistenceUnitExistsDuringConstruction = persistenceUnit != null;
- }
-
- public EntityManager getPersistenceContext()
- {
- return persistenceContext;
- }
-
- public EntityManagerFactory getPersistenceUnit()
- {
- return persistenceUnit;
- }
-
- public boolean isPersistenceContextExistsDuringConstruction()
- {
- return persistenceContextExistsDuringConstruction;
- }
-
- public boolean isPersistenceUnitExistsDuringConstruction()
- {
- return persistenceUnitExistsDuringConstruction;
- }
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/Another.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/Another.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/Another.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -18,5 +18,4 @@
@BindingType
@interface Another
{
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,10 +1,12 @@
package org.jboss.jsr299.tck.tests.implementation.simple.resource.resource;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
@@ -14,9 +16,7 @@
import org.testng.annotations.Test;
/**
- *
- * Spec version: 20090519
- *
+ * Spec version: 20090625
*/
@Artifact
@Packaging(PackagingType.WAR)
@@ -24,16 +24,29 @@
@BeansXml("beans.xml")
public class InjectionOfResourceTest extends AbstractJSR299Test
{
- @Test(groups = { "ri-broken", "beanLifecycle", "commonAnnotations", "integration" })
- @SpecAssertion(section = "3.6.1", id = "bb")
+ @Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertion(section = "3.5.1", id = "bb")
public void testInjectionOfResource()
{
- Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
- CreationalContext<SimpleBean> creationalContext = getCurrentManager().createCreationalContext(simpleBeanBean);
- SimpleBean simpleBean = simpleBeanBean.create(creationalContext);
- BeanManager beanManager = simpleBean.getManager();
- assert !simpleBean.isManagerInjected() : "Manager injected too early";
- assert beanManager != null : "@Another Manager not found";
- assert beanManager.equals(getCurrentManager()): "Wrong manager found";
+ Bean<ManagedBean> managedBeanBean = getBeans(ManagedBean.class).iterator().next();
+ CreationalContext<ManagedBean> managedBeanCc = getCurrentManager().createCreationalContext(managedBeanBean);
+ ManagedBean managedBean = managedBeanBean.create(managedBeanCc);
+ assert managedBean.getBeanManager() != null : "@Another Manager not found";
+ assert managedBean.getBeanManager().equals(getCurrentManager()): "Wrong manager found";
}
+
+ @Test(groups = { "beanLifecycle", "commonsAnnotations", "integration" })
+ @SpecAssertions({
+ @SpecAssertion(section = "7.3.6", id = "l"),
+ @SpecAssertion(section = "7.3.6", id = "m"),
+ @SpecAssertion(section = "7.3.6", id = "o")
+ })
+ public void testProduceResourceProxy()
+ {
+ Bean<BeanManager> beanManagerBean = getBeans(BeanManager.class, new AnnotationLiteral<Another>() {}).iterator().next();
+ CreationalContext<BeanManager> beanManagerCc = getCurrentManager().createCreationalContext(beanManagerBean);
+ BeanManager beanManager = beanManagerBean.create(beanManagerCc);
+ assert beanManager != null;
+ assert beanManager.equals(getCurrentManager());
+ }
}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ManagedBean.java (from rev 3118, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/SimpleBean.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ManagedBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ManagedBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.resource;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+class ManagedBean
+{
+ private @Another BeanManager beanManager;
+
+ public BeanManager getBeanManager()
+ {
+ return beanManager;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ResourceProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ResourceProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/ResourceProducer.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.resource;
+
+import javax.annotation.Resource;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.BeanManager;
+
+class ResourceProducer
+{
+ private @Produces @Another @Resource(mappedName = "java:app/BeanManager") BeanManager manager;
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/SimpleBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/SimpleBean.java 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/SimpleBean.java 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,26 +0,0 @@
-package org.jboss.jsr299.tck.tests.implementation.simple.resource.resource;
-
-import javax.annotation.Resource;
-import javax.enterprise.inject.spi.BeanManager;
-
-class SimpleBean
-{
- @Resource
- private BeanManager beanManager;
- private boolean managerInjected;
-
- public SimpleBean()
- {
- managerInjected = beanManager != null;
- }
-
- public BeanManager getManager()
- {
- return beanManager;
- }
-
- public boolean isManagerInjected()
- {
- return managerInjected;
- }
-}
Deleted: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/web.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/web.xml 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/web.xml 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <description>EJB references for Simple Beans.</description>
- <display-name>EJB Injection Tests</display-name>
-
- <ejb-ref>
- <ejb-ref-name>ejb/MyRemoteEjb</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <remote>org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb.RemoteEjbInterface</remote>
- </ejb-ref>
-
- <session-config>
- <session-timeout>10</session-timeout>
- </session-config>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
-</web-app>
\ No newline at end of file
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/beans.xml 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,3 @@
+<beans>
+
+</beans>
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/web.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/web.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/web.xml 2009-07-22 20:12:03 UTC (rev 3145)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>Environment variables for managed beans</description>
+ <display-name>Env Injection Tests</display-name>
+
+ <env-entry>
+ <env-entry-name>greeting</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Hello there my friend</env-entry-value>
+ </env-entry>
+
+ <listener>
+ <listener-class>org.jboss.testharness.impl.runner.servlet.HarnessServletListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <servlet-class>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+
+</web-app>
Modified: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/beans.xml 2009-07-22 20:10:50 UTC (rev 3144)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/beans.xml 2009-07-22 20:12:03 UTC (rev 3145)
@@ -1,11 +1,2 @@
-<Beans xmlns="urn:java:ee"
- xmlns:app="urn:java:org.jboss.jsr299.tck.tests.implementation.simple.resource.resource"
- xmlns:m="urn:java:javax.enterprise.inject.spi">
-
- <m:Manager>
- <Resource>
- <mappedName>java:app/Manager</mappedName>
- </Resource>
- <app:Another />
- </m:Manager>
-</Beans>
+<beans>
+</beans>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3144 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeployElements.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-22 16:10:50 -0400 (Wed, 22 Jul 2009)
New Revision: 3144
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeployElements/TooManyDeployElementsTest.java
Log:
remove reference to non-existing default-beans.xml
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeployElements/TooManyDeployElementsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeployElements/TooManyDeployElementsTest.java 2009-07-22 20:10:19 UTC (rev 3143)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeployElements/TooManyDeployElementsTest.java 2009-07-22 20:10:50 UTC (rev 3144)
@@ -8,17 +8,15 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
import org.testng.annotations.Test;
@Artifact
@IntegrationTest
@Packaging(PackagingType.WAR)
-@Resources({
- @Resource(destination="WEB-INF/classes/META-INF/beans.xml", source="default-beans.xml"),
- @Resource(destination="WEB-INF/beans.xml", source="default-beans.xml")
-})
+//@Resources({
+// @Resource(destination="WEB-INF/classes/META-INF/beans.xml", source="default-beans.xml"),
+// @Resource(destination="WEB-INF/beans.xml", source="default-beans.xml")
+//})
@ExpectedDeploymentException(DeploymentError.class)
public class TooManyDeployElementsTest extends AbstractJSR299Test
{
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3143 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-22 16:10:19 -0400 (Wed, 22 Jul 2009)
New Revision: 3143
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationTimeoutTest.java
Log:
remove println
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationTimeoutTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationTimeoutTest.java 2009-07-22 20:06:32 UTC (rev 3142)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationTimeoutTest.java 2009-07-22 20:10:19 UTC (rev 3143)
@@ -21,7 +21,6 @@
public void testConversationHasDefaultTimeout()
{
Conversation conversation = getInstanceByType(Conversation.class);
- System.out.println(conversation.getTimeout());
assert conversation.getTimeout() > 0;
}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3142 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-22 16:06:32 -0400 (Wed, 22 Jul 2009)
New Revision: 3142
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
whitespace
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 17:20:05 UTC (rev 3141)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 20:06:32 UTC (rev 3142)
@@ -1128,8 +1128,7 @@
</assertion>
<assertion id="gg">
- <text>The injection annotation specifies the metadata needed to obtain the resources, entity manager, entity manager factory, remote
-EJB instance or web service reference from the component environment.</text>
+ <text>The injection annotation specifies the metadata needed to obtain the resources, entity manager, entity manager factory, remote EJB instance or web service reference from the component environment.</text>
</assertion>
<assertion id="hh">
@@ -3209,8 +3208,7 @@
<section id="7.3.6" title="Lifecycle of resources">
<assertion id="l">
- <text>When the |create()| method of a |Bean| object that represents a resource is called, the container creates and returns a container-
-specific internal reference to the Java EE component environment resource, entity manager, entity manager factory, remote EJB instance or web service reference. This reference is not directly exposed to the application.</text>
+ <text>When the |create()| method of a |Bean| object that represents a resource is called, the container creates and returns a container-specific internal reference to the Java EE component environment resource, entity manager, entity manager factory, remote EJB instance or web service reference. This reference is not directly exposed to the application.</text>
</assertion>
<assertion id="m">
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3141 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-22 13:20:05 -0400 (Wed, 22 Jul 2009)
New Revision: 3141
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/broken/newAndOtherBindingType/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/InvalidEnterpriseBeanSpecializationTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
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:
Review more tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java 2009-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java 2009-07-22 17:20:05 UTC (rev 3141)
@@ -55,9 +55,8 @@
* The request context is destroyed at the end of the servlet request, after
* the Servlet service() method returns.
*/
- @Test(groups = { "contexts", "servlet", "integration" })
- //@SpecAssertion(section = "6.7.1", id = "ba")
- @SpecAssertion(section="unknown", id="unknown")
+ @Test(groups = { "contexts", "servlet", "integration", "review" })
+ @SpecAssertion(section="6.7.1", id="baa")
// TODO Need to tidy this one up, make it actually check that the context is active til after the service method ends
public void testRequestScopeIsDestroyedAfterServletRequest() throws Exception
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-07-22 17:20:05 UTC (rev 3141)
@@ -5,7 +5,6 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.deployment.Production;
import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -151,15 +150,6 @@
}
@Test(groups = "producerField")
- @SpecAssertion(section = "3.4.2", id = "review")
- public void testDeploymentType()
- {
- Set<Bean<Tarantula>> tarantulaBeans = getBeans(Tarantula.class, TAME_LITERAL, FOO_LITERAL);
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- }
-
- @Test(groups = "producerField")
@SpecAssertions({
@SpecAssertion(section = "3.4.2", id = "c"),
@SpecAssertion(section="2.5.1", id = "c")
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/InvalidEnterpriseBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/InvalidEnterpriseBeanSpecializationTest.java 2009-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/InvalidEnterpriseBeanSpecializationTest.java 2009-07-22 17:20:05 UTC (rev 3141)
@@ -1,32 +0,0 @@
-package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.testng.annotations.Test;
-
-/**
- * Spec version: 20090625
- */
-@Artifact
-(a)Packaging(PackagingType.EAR)
-@BeansXml("beans.xml")
-public class InvalidEnterpriseBeanSpecializationTest extends AbstractJSR299Test
-{
- @Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.2.4", id = "review") // removed from spec?
- public void testSpecializingBeanDoesNotSupportAllLocalInterfacesOnSpecializedBean()
- {
- assert false;
- }
-
- @Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.2.4", id = "review") // removed from spec?
- public void testSpecializingBeanDoesNotSupportLocalInterfaceView()
- {
- assert false;
- }
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-07-22 17:20:05 UTC (rev 3141)
@@ -43,7 +43,7 @@
}
@Test
- @SpecAssertion(section = "unknown", id = "unknown")
+ @SpecAssertion(section = "5.5", id = "c")
public void testSimpleBeanClientProxyIsSerializable() throws IOException, ClassNotFoundException
{
TunedTuna tuna = getInstanceByType(TunedTuna.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-07-22 17:20:05 UTC (rev 3141)
@@ -53,9 +53,9 @@
assert injectionPoint.getPaymentProcessor() instanceof Instance;
}
- @Test(groups = "ri-broken")
+ @Test(groups = {"ri-broken", "review"})
@SpecAssertions({
- @SpecAssertion(section = "5.7", id ="review"),
+ @SpecAssertion(section = "5.7", id ="ba"),
@SpecAssertion(section = "5.7", id ="ca"),
@SpecAssertion(section = "5.7.1", id ="ab"),
@SpecAssertion(section = "5.7.1", id ="ba")
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-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-07-22 17:20:05 UTC (rev 3141)
@@ -3,7 +3,6 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.Current;
-import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
@@ -52,14 +51,6 @@
Bean<BeanManager> beanManager = getBeans(BeanManager.class).iterator().next();
assert beanManager.getScopeType().equals(Dependent.class);
}
-
- @Test(groups = {"deployment"})
- @SpecAssertion(section = "11.3", id = "review") // deployment types removed from spec
- public void testManagerBeanHasStandardDeployment()
- {
- Bean<BeanManager> beanManager = getBeans(BeanManager.class).iterator().next();
- assert beanManager.getDeploymentType().equals(Standard.class);
- }
@Test
@SpecAssertion(section = "11.3", id = "a")
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 17:06:33 UTC (rev 3140)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 17:20:05 UTC (rev 3141)
@@ -1901,9 +1901,15 @@
<text>Client proxies are never required for a bean whose scope is a pseudo-scope such as |@Dependent|</text>
</assertion>
- <assertion id="b">
+ <assertion id="b" testable="false">
<text>Client proxies are used for normal scoped beans</text>
+ <note>This is a statement of intent</note>
</assertion>
+
+ <assertion id="c" implied="true">
+ <text>Client proxies are serializable</text>
+ <note>For "client proxies are may be passivated, even when the bean itself may not be. Therefore the container must use a client proxy whenever a bean with normal scope is injected into a bean with a passivating scope" to hold true the client proxy must be serializable</note>
+ </assertion>
<assertion id="d">
<text>The container must guarantee that when any valid injected reference to a bean of normal scope is invoked, the invocation is always processed by the current instance of the injected bean.</text>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3140 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/context/passivating/broken6 and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-22 13:06:33 -0400 (Wed, 22 Jul 2009)
New Revision: 3140
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken6/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken7/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken8/NonSerializableTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
More improvements to audit for passivating contexts
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22 16:51:41 UTC (rev 3139)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22 17:06:33 UTC (rev 3140)
@@ -39,13 +39,13 @@
assert !beans.isEmpty();
}
- @Test @SpecAssertion(section="unknown", id = "unknown")
+ @Test @SpecAssertion(section="review", id = "review")
public void testInjectionOfDependentPrimitiveProductIntoNormalBean()
{
getInstanceByType(NumberConsumer.class).ping();
}
- @Test @SpecAssertion(section="unknown", id = "unknown")
+ @Test @SpecAssertion(section="6.6.2", id = "6.6.2")
public void testInjectionOfDependentSerializableProductIntoNormalBean()
{
getInstanceByType(SerializableCityConsumer.class).ping();
@@ -53,10 +53,9 @@
@Test(groups = { "contexts", "passivation" })
@SpecAssertions({
- @SpecAssertion(section = "unknown", id = "unknown"),
- @SpecAssertion(section = "unknown", id = "unknown")
+ @SpecAssertion(section = "6.6", id = "a")
})
- public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
+ public void testPassivationOccurs() throws IOException, ClassNotFoundException
{
Kajaani instance = getInstanceByType(Kajaani.class);
instance.setTheNumber(100);
@@ -78,49 +77,13 @@
return resurrected.toString().equals(instance.toString());
}
- /**
- * @throws ClassNotFoundException
- * @throws IOException
- */
- @Test(groups = { "contexts", "passivation", "ri-broken" })
- @SpecAssertion(section = "unknown", id = "unknown")
- public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
- {
- Set<Bean<Vaasa>> vaasaBeans = getBeans(Vaasa.class);
- assert vaasaBeans.size() == 1;
- assert testSerialize(vaasaBeans.iterator().next());
- }
-
@Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.4", id = "aab")
- public void testSimpleWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
+ @SpecAssertion(section = "6.6.4", id = "aaba")
+ public void testBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
{
Set<Bean<Joensuu>> beans = getBeans(Joensuu.class);
assert !beans.isEmpty();
}
-
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "unknown", id = "unknown")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- Set<Bean<Hyvinkaa>> beans = getBeans(Hyvinkaa.class);
- assert !beans.isEmpty();
- }
-
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "unknown", id = "unknown")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- getInstanceByType(Salo_Broken.class).ping();
- }
-
- @Test(groups = { "contexts", "passivation", "enterpriseBean", "integration" })
- //@SpecAssertion(section = "8.4", id = "a")
- @SpecAssertion(section = "unknown", id = "unknown")
- public void testEJBWebBeanCanDeclarePassivatingScope()
- {
- assert getBeans(TurkuLocal.class).size() == 1;
- }
@Test(expectedExceptions = IllegalProductException.class)
@SpecAssertion(section = "6.6.4", id = "d")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken6/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken6/NonSerializableTest.java 2009-07-22 16:51:41 UTC (rev 3139)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken6/NonSerializableTest.java 2009-07-22 17:06:33 UTC (rev 3140)
@@ -16,7 +16,7 @@
public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.4", id = "aab")
+ @SpecAssertion(section = "6.6.4", id = "aaba")
public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken7/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken7/NonSerializableTest.java 2009-07-22 16:51:41 UTC (rev 3139)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken7/NonSerializableTest.java 2009-07-22 17:06:33 UTC (rev 3140)
@@ -16,7 +16,7 @@
public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.4", id = "aab")
+ @SpecAssertion(section = "6.6.4", id = "aabb")
public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken8/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken8/NonSerializableTest.java 2009-07-22 16:51:41 UTC (rev 3139)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken8/NonSerializableTest.java 2009-07-22 17:06:33 UTC (rev 3140)
@@ -16,7 +16,7 @@
public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.4", id = "aab")
+ @SpecAssertion(section = "6.6.4", id = "aabc")
public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:51:41 UTC (rev 3139)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 17:06:33 UTC (rev 3140)
@@ -2548,7 +2548,9 @@
</section>
<section id="6.6" title="Passivation and passivating scopes">
-
+ <assertion id="a" implied="true">
+ <text>Test passivation occurs</text>
+ </assertion>
</section>
<section id="6.6.1" title="Passivation capable beans">
@@ -2645,10 +2647,18 @@
<note>Here we check the class, as interceptors and decorators are tested below</note>
</assertion>
- <assertion id="aab">
- <text>If a managed bean which declares a passivating scope has a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="aaba">
+ <text>If a managed bean which declares a passivating scope has a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+ <assertion id="aabb">
+ <text>If a managed bean which declares a passivating scope has a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="aabc">
+ <text>If a managed bean which declares a passivating scope has a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
<assertion id="aac">
<text>If a managed bean which declares a passivating scope has an interceptor ~or decorator~ with a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3139 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/context/passivating/broken11 and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-22 12:51:41 -0400 (Wed, 22 Jul 2009)
New Revision: 3139
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Fix up passivation assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22 16:23:19 UTC (rev 3138)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22 16:51:41 UTC (rev 3139)
@@ -23,7 +23,7 @@
* @author Nicklas Karlsson
* @author David Allen
*
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@BeansXml("beans.xml")
@@ -32,7 +32,7 @@
{
@Test(groups = { "contexts", "passivation", "review" })
- @SpecAssertion(section = "6.6.1", id = "b")
+ @SpecAssertion(section = "6.6.1", id = "ba")
public void testSimpleWebBeanWithSerializableImplementationClassOK()
{
Set<Bean<Jyvaskyla>> beans = getBeans(Jyvaskyla.class);
@@ -128,14 +128,6 @@
{
getInstanceByType(HelsinkiNonSerializable.class).ping();
}
-
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.1", id = "b")
- public void testPassivationCapableBean()
- {
- assert !isSerializable(getBeans(Sysma.class).iterator().next().getBeanClass());
- assert isSerializable(getBeans(Hyvinkaa.class).iterator().next().getBeanClass());
- }
public static boolean isSerializable(Class<?> clazz)
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java 2009-07-22 16:23:19 UTC (rev 3138)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java 2009-07-22 16:51:41 UTC (rev 3139)
@@ -18,7 +18,7 @@
public class EnterpriseBeanWithIllegalDependencyTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation", "integration"})
- @SpecAssertion(section = "6.6.4", id = "f")
+ @SpecAssertion(section = "6.6.4", id = "fa")
public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:23:19 UTC (rev 3138)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:51:41 UTC (rev 3139)
@@ -2552,21 +2552,38 @@
</section>
<section id="6.6.1" title="Passivation capable beans">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>As defined by the EJB specification, all stateful session beans are passivation capable. Stateless and singleton session beans are not passivation capable.</text>
+ <note>Defined by EJB spec</note>
</assertion>
- <assertion id="b">
- <text>A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and decorators of the bean are serializable.</text>
+ <assertion id="ba">
+ <text>A managed bean is passivation capable if and only if the bean class is _serializable_ and all interceptors and decorators of the bean are serializable.</text>
</assertion>
+
+ <assertion id="bb">
+ <text>A managed bean is passivation capable if and only if the bean class is serializable and all _interceptors_ and decorators of the bean are serializable.</text>
+ </assertion>
+
+ <assertion id="bc">
+ <text>A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and _decorators_ of the bean are serializable.</text>
+ </assertion>
- <assertion id="c">
- <text>A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime. A producer method with a return type that implements or extends serializable is passivation capable. A producer method with a return type that is declared final and does not implement |Serializable| is not passivation capable.</text>
+ <assertion id="ca">
+ <text>A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime. _A producer method with a return type that implements or extends serializable is passivation capable_. A producer method with a return type that is declared final and does not implement |Serializable| is not passivation capable.</text>
</assertion>
+
+ <assertion id="cb">
+ <text>A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime. A producer method with a return type that implements or extends serializable is passivation capable. _A producer method with a return type that is declared final and does not implement |Serializable| is not passivation capable._</text>
+ </assertion>
- <assertion id="d">
- <text>A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime. A producer field with a type that implements or extends |Serializable| is passivation capable. A producer field with a type that is declared |final| and does not implement |Serializable| is not passivation capable.</text>
+ <assertion id="da">
+ <text>A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime. _A producer field with a type that implements or extends |Serializable| is passivation capable._ A producer field with a type that is declared |final| and does not implement |Serializable| is not passivation capable.</text>
</assertion>
+
+ <assertion id="db">
+ <text>A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime. A producer field with a type that implements or extends |Serializable| is passivation capable. _A producer field with a type that is declared |final| and does not implement |Serializable| is not passivation capable._</text>
+ </assertion>
<assertion id="ea">
<text>A custom implementation of Bean is passivation capable if it implements the interface |PassivationCapable|.</text>
@@ -2577,8 +2594,13 @@
</assertion>
<assertion id="g">
- <text>The |getId()| method must return a value that uniquely identifies the instance of |Bean| or |Contextual|. It is recommended that the string contain the package name of the class that implements |Bean| or |Contextual|.</text>
+ <text>The |getId()| method must return a value that uniquely identifies the instance of |Bean| or |Contextual|.</text>
</assertion>
+
+ <assertion id="h" testable="false">
+ <text>The |getId()| ~method must return a value that uniquely identifies the instance of |Bean| or |Contextual|. It~ is recommended that the string contain the package name of the class that implements |Bean| or |Contextual|.</text>
+ <note>Recommendation only</note>
+ </assertion>
</section>
<section id="6.6.2" title="Passivation capable dependencies">
@@ -2663,9 +2685,29 @@
<text>If a stateful session bean has a non-transient~ injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- <assertion id="bd">
- <text>If a stateful session bean has an interceptor or decorator with a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="bda">
+ <text>If a stateful session bean has an interceptor ~or decorator~ with a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+
+ <assertion id="bdb">
+ <text>If a stateful session bean has an interceptor ~or decorator~ with a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bdc">
+ <text>If a stateful session bean has an interceptor ~or decorator~ with a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bdd">
+ <text>If a stateful session bean has an ~interceptor or~ decorator with a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bde">
+ <text>If a stateful session bean has an ~interceptor or~ decorator with a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bdf">
+ <text>If a stateful session bean has an ~interceptor or~ decorator with a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
<assertion id="ca">
<text>If a producer method declares a passivating scope and the container is able to determine that it is not passivation capable by inspecting its return type~, or has a parameter that does not resolve to a passivation capable dependency,~ then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
@@ -2680,21 +2722,37 @@
"Problems detected automatically by the container".</text>
</assertion>
- <assertion id="e">
- <text>If a producer method or field which declares a passivating scope returns an unserializable object at runtime, the container must throw an |IllegalProductException|.</text>
+ <assertion id="ea">
+ <text>If a producer method ~or field~ which declares a passivating scope returns an unserializable object at runtime, the container must throw an |IllegalProductException|.</text>
</assertion>
+
+ <assertion id="eb">
+ <text>If a producer ~method or~ field which declares a passivating scope returns an unserializable object at runtime, the container must throw an |IllegalProductException|.</text>
+ </assertion>
- <assertion id="f">
- <text>If a producer method or field of scope |@Dependent| returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an |IllegalProductException|</text>
+ <assertion id="fa">
+ <text>If a producer method ~or field~ of scope |@Dependent| returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an |IllegalProductException|</text>
</assertion>
+
+ <assertion id="fb">
+ <text>If a producer ~method or~ field of scope |@Dependent| returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an |IllegalProductException|</text>
+ </assertion>
- <assertion id="g">
- <text>For a custom implementation of |Bean|, the container calls |getInjectionPoints()| to determine the injection points, and |InjectionPoint.isTransient()| to determine whether the injected point is a transient field.</text>
+ <assertion id="ga">
+ <text>For a custom implementation of |Bean|, the container calls |getInjectionPoints()| to determine the injection points~, and |InjectionPoint.isTransient()| to determine whether the injected point is a transient field~.</text>
</assertion>
+
+ <assertion id="gb">
+ <text>For a custom implementation of |Bean|, the container calls ~ |getInjectionPoints()| to determine the injection points, and~ |InjectionPoint.isTransient()| to determine whether the injected point is a transient field.</text>
+ </assertion>
- <assertion id="h">
- <text>If a bean which declares a passivating scope type, or any stateful session bean, has a decorator which is not a passivation capable dependency, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="ha">
+ <text>If a bean which declares a passivating scope type~, or any stateful session bean,~ has a decorator which is not a passivation capable dependency, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+
+ <assertion id="hb">
+ <text>If ~a bean which declares a passivating scope type, or~ any stateful session bean, has a decorator which is not a passivation capable dependency, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
</section>
<section id="6.7" title="Context management for built-in scopes">
15 years, 4 months