[arquillian-issues] [JBoss JIRA] Created: (ARQ-438) @DeploymentName and @OperatesOnDeployment could be made typesafe

Karel Piwko (JIRA) jira-events at lists.jboss.org
Tue May 10 02:32:18 EDT 2011


@DeploymentName and @OperatesOnDeployment could be made typesafe
----------------------------------------------------------------

                 Key: ARQ-438
                 URL: https://issues.jboss.org/browse/ARQ-438
             Project: Arquillian
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: Deployable Containers SPI
    Affects Versions: 1.0.0.Alpha5
            Reporter: Karel Piwko
            Priority: Minor


Currently, multideployments are controlled by string based name, e.g.

{code}
    @Deployment(name = "dep.active-1")
    @TargetsContainer("container.active-1")
    public static WebArchive createTestDeployment() {
        return Deployments.createActiveClient();
    }

    @Test
    @OperateOnDeployment("dep.active-1")
    public void callActive1() throws Exception {
        int count = incrementCache(cache);
        System.out.println("Cache incremented, current count: " + count);
        Assert.assertEquals(1, count);
    }
{code} 

Deployment.name can be switched to a meta annotation and than this functionality can be provided in a type-safe way, e.g.

{code}

@DeploymentTarget
public @interface MyExtraDeployment {}


public Test {

    @Deployment
    @MyExtraDeployment
    @TargetsContainer("container.active-1")
    public static WebArchive createTestDeployment() {
        return Deployments.createActiveClient();
    }

    @Test
    @MyExtraDeployment
    public void callActive1() throws Exception {
        int count = incrementCache(cache);
        System.out.println("Cache incremented, current count: " + count);
        Assert.assertEquals(1, count);
    }

{code}


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list