[arquillian-issues] [JBoss JIRA] (ARQ-917) Support the use of @Deployment on a static field
Tommy Tynjä (JIRA)
jira-events at lists.jboss.org
Mon Mar 18 06:40:42 EDT 2013
[ https://issues.jboss.org/browse/ARQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761545#comment-12761545 ]
Tommy Tynjä commented on ARQ-917:
---------------------------------
I would find the @ReadDeploymentFrom annotation unnecessary. What I've usually encountered is a specific class defining a deployment, and then just extend that class from the test class. Example:
{code:java}public class DefaultProjectDeployment {
@Deployment public static Archive createDeployment() { ... }
}
public class MyIntegrationTest extends DefaultProjectDeployment {
@Test public void shouldTestSomething() { ... }
}
{code}
Sure it could be benefitial if you want to reference a deployment from a class which contains tests which you don't want to inherit, but I would argue that you should restructure your code in that case.
> Support the use of @Deployment on a static field
> ------------------------------------------------
>
> Key: ARQ-917
> URL: https://issues.jboss.org/browse/ARQ-917
> Project: Arquillian
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Base Implementation
> Affects Versions: 1.0.0.Final
> Reporter: Dan Allen
> Priority: Minor
>
> To cut down on verbosity and visual clutter for simple use cases, allow the use of a static field to define a @Deployment. If logic is required to build the deployment, a static block can be used. This also caters well when delegating to a static method.
> See examples in this gist: https://gist.github.com/2640101
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list