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

Rename @Target, @Expected, @Run and @DeploymentTarget annotations

    Details

      Description

      For better consistent naming, we should rename the API annotations:

      • @Run(RunModeType) = @RunAsClient
        • InContainer is extracted from @Deployment(testable) and only possible to override with AS_CLIENT
      • @Expected = @ShouldThrowException
      • @Target = @TargetsContainer("x")
        • Clearify meaning
      • @DeploymentTarget = @OperateOnDeployment
        • Clearify that this test will operate within the context of the @Deployment

      public class TestClass
      {
       
      	@Deployment(name = "dep", testable=false) @ShouldThrowException(Exception.class) @TargetsContainer("x")
      	public JavaArchive create() {}
       
      container x{
      	deployment dep{
       
      	@Test @RunAsClient @OperateOnDeployment("dep") 
      	public void shouldBe() {}
       
      container x{
      	
      	@Test @OperateOnContainer("x")
      	public void shouldBe() {}
      	
      }
      

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            alrubinger Andrew Rubinger added a comment -

            Reviewed, discussed in IRC w/ Aslak, and +1 from me.

            Show
            alrubinger Andrew Rubinger added a comment - Reviewed, discussed in IRC w/ Aslak, and +1 from me.
            Hide
            aslak Aslak Knutsen added a comment - - edited

            Other points:

            • @Deployment.startup = @Deployment.managed | @Deployment.manual
              • If Arquillian should handle deploy and undeploy
            • @Deployment.testable = ?
              • If the deployment should be enriched for in-container testing
            Show
            aslak Aslak Knutsen added a comment - - edited Other points: @Deployment.startup = @Deployment.managed | @Deployment.manual If Arquillian should handle deploy and undeploy @Deployment.testable = ? If the deployment should be enriched for in-container testing
            Hide
            aslak Aslak Knutsen added a comment - - edited

            @Deployment.startup renamed managed, to avoid changing boolean logic.

            @Protocol renamed @OverProtocol

             
            @Deployment @TargetsContainer("active-1") @ShouldThrowException(Exception.class)
            public void WebArchive myFailingComponent() 
            {
               return ShrinkWrap.create(WebArchive.class);
            }
             
            @Deployment(name = "app1") @TargetsContainer("active-1") @OverProtocol("Servlet 3.0")
            public void WebArchive myComponent() 
            {
               return ShrinkWrap.create(WebArchive.class);
            }
             
            @Test @OperateOnDeployment("app1")
            public void shouldDoX(MyComponent x)
            {
              // assert x
            }
             
            @Test @OperateOnDeployment("app1") @RunAsClient
            public void shouldDoX(MyComponent x)
            {
              // assert x
            }
            
            

            Show
            aslak Aslak Knutsen added a comment - - edited @Deployment.startup renamed managed, to avoid changing boolean logic. @Protocol renamed @OverProtocol   @Deployment @TargetsContainer("active-1") @ShouldThrowException(Exception.class) public void WebArchive myFailingComponent() { return ShrinkWrap.create(WebArchive.class); }   @Deployment(name = "app1") @TargetsContainer("active-1") @OverProtocol("Servlet 3.0") public void WebArchive myComponent() { return ShrinkWrap.create(WebArchive.class); }   @Test @OperateOnDeployment("app1") public void shouldDoX(MyComponent x) { // assert x }   @Test @OperateOnDeployment("app1") @RunAsClient public void shouldDoX(MyComponent x) { // assert x }
            Hide
            aslak Aslak Knutsen added a comment -

            pushed upstream master

            Show
            aslak Aslak Knutsen added a comment - pushed upstream master

              People

              • Assignee:
                aslak Aslak Knutsen
                Reporter:
                aslak Aslak Knutsen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development