-
Sub-task
-
Resolution: Done
-
Major
-
2.15.1.Final
-
None
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
- relates to
-
FORGE-1790 Make adding addon deps easier in getDeployment().
- Closed