Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-438

@DeploymentName and @OperatesOnDeployment could be made typesafe

    XMLWordPrintable

Details

    Description

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

          @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);
          }
      

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

      @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);
          }
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kpiwko Karel Piwko
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: