Skip to content

Commit

Permalink
Weld subsystem update tests for transformers
Browse files Browse the repository at this point in the history
  • Loading branch information
ctomc committed Dec 7, 2015
1 parent 3d0d1c5 commit ceeb676
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 54 deletions.
68 changes: 14 additions & 54 deletions weld/src/test/java/org/jboss/as/weld/WeldSubsystemTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,93 +69,53 @@ public void testSubsystem10() throws Exception {
}

@Test
public void testTransformersAS712() throws Exception {
testTransformers10(ModelTestControllerVersion.V7_1_2_FINAL);
public void testTransformersASEAP620() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_2_0);
}

@Test
public void testTransformersAS713() throws Exception {
testTransformers10(ModelTestControllerVersion.V7_1_3_FINAL);
public void testTransformersASEAP630() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_3_0);
}

@Test
public void testTransformersAS720() throws Exception {
testTransformers10(ModelTestControllerVersion.V7_2_0_FINAL);
}

@Test
public void testTransformersEAP600() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_0_0);
}

@Test
public void testTransformersEAP601() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_0_1);
}

@Test
public void testTransformersEAP610() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_1_0);
}

@Test
public void testTransformersEAP611() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_1_1);
public void testTransformersASEAP640() throws Exception {
testTransformers10(ModelTestControllerVersion.EAP_6_4_0);
}


private void testTransformers10(ModelTestControllerVersion controllerVersion) throws Exception {
ModelVersion modelVersion = ModelVersion.create(1, 0, 0);
KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
.setSubsystemXmlResource("subsystem.xml");
.setSubsystemXmlResource("subsystem-transformers.xml");
//which is why we need to include the jboss-as-controller artifact.
builder.createLegacyKernelServicesBuilder(AdditionalInitialization.MANAGEMENT, controllerVersion, modelVersion)
.addMavenResourceURL("org.jboss.as:jboss-as-weld:" + controllerVersion.getMavenGavVersion())
.skipReverseControllerCheck()
.dontPersistXml();

KernelServices mainServices = builder.build();
Assert.assertTrue(mainServices.isSuccessfulBoot());
KernelServices legacyServices = mainServices.getLegacyServices(modelVersion);
Assert.assertTrue(mainServices.isSuccessfulBoot());
Assert.assertTrue(legacyServices.isSuccessfulBoot());

checkSubsystemModelTransformation(mainServices, modelVersion);

}

@Test
public void testTransformersRejectionAS712() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.V7_1_2_FINAL);
}

@Test
public void testTransformersRejectionAS713() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.V7_1_3_FINAL);
}

@Test
public void testTransformersRejectionAS720() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.V7_2_0_FINAL);
}

@Test
public void testTransformersRejectionEAP600() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_0_0);
}

@Test
public void testTransformersRejectionEAP601() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_0_1);
public void testTransformersRejectionASEAP620() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_2_0);
}

@Test
public void testTransformersRejectionEAP610() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_1_0);
public void testTransformersRejectionASEAP630() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_3_0);
}

@Test
public void testTransformersRejectionEAP611() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_1_1);
public void testTransformersRejectionASEAP640() throws Exception {
testRejectTransformers10(ModelTestControllerVersion.EAP_6_4_0);
}

private void testRejectTransformers10(ModelTestControllerVersion controllerVersion) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<subsystem xmlns="urn:jboss:domain:weld:3.0" require-bean-descriptor="true" non-portable-mode="true" development-mode="false" />

0 comments on commit ceeb676

Please sign in to comment.