Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.15.1.Final
    • Fix Version/s: 2.15.2.Final
    • Component/s: Java EE
    • Labels:
      None

      Description

      The JPA / Bean Validation / CDI Tests have recently been strenghten. It is important to refactor them with new @AddonDependency management (because these tests are used in the Tutorials and should use the latest dependency management)

      Tests should look like this : https://github.com/forge/core/blob/master/maven/tests/src/test/java/org/jboss/forge/addon/maven/projects/facets/MavenFacetTest.java

      There is a command to create tests : addon-new-test
      https://github.com/forge/core/blob/master/addons/impl/src/main/java/org/jboss/forge/addon/addons/ui/NewFurnaceTestCommandImpl.java

      So the tests go from :

         @Deployment
         @AddonDeployments({
                  @AddonDeployment(name = "org.jboss.forge.addon:ui"),
                  @AddonDeployment(name = "org.jboss.forge.addon:ui-test-harness"),
                  @AddonDeployment(name = "org.jboss.forge.addon:shell-test-harness"),
                  @AddonDeployment(name = "org.jboss.forge.addon:javaee"),
                  @AddonDeployment(name = "org.jboss.forge.addon:maven")
         })
         public static AddonArchive getDeployment()
         {
            return ShrinkWrap
                     .create(AddonArchive.class)
                     .addClass(ProjectHelper.class)
                     .addBeansXML()
                     .addAsAddonDependencies(
                              AddonDependencyEntry.create("org.jboss.forge.furnace.container:cdi"),
                              AddonDependencyEntry.create("org.jboss.forge.addon:projects"),
                              AddonDependencyEntry.create("org.jboss.forge.addon:ui"),
                              AddonDependencyEntry.create("org.jboss.forge.addon:ui-test-harness"),
                              AddonDependencyEntry.create("org.jboss.forge.addon:shell-test-harness"),
                              AddonDependencyEntry.create("org.jboss.forge.addon:javaee"),
                              AddonDependencyEntry.create("org.jboss.forge.addon:maven")
                     );
         }
      

      To

         @Deployment
         @AddonDependencies({
                  @AddonDependency(name = "org.jboss.forge.addon:ui-test-harness"),
                  @AddonDependency(name = "org.jboss.forge.addon:shell-test-harness"),
                  @AddonDependency(name = "org.jboss.forge.addon:javaee"),
                  @AddonDependency(name = "org.jboss.forge.addon:maven"),
                  @AddonDependency(name = "org.jboss.forge.furnace.container:cdi")
         })
         public static AddonArchive getDeployment()
         {
            return ShrinkWrap.create(AddonArchive.class).addBeansXML().addClass(ProjectHelper.class);
         }
      

      But there is still a problem with the setup commands JPASetupWizardTest, RestSetupTest and WebSocketSetupWizardTest

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  agoncal Antonio Goncalves
                  Reporter:
                  agoncal Antonio Goncalves
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: