Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
starksm64 authored Aug 28, 2024
2 parents cbaab55 + e60a0b2 commit 03ae086
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,17 @@ private DefaultEEMapping() {}
/**
* Pass in a class from the EE11 TCK and if the class has been split into multiple classes in the EE11
* as indicated by a number at the end of the class name, then add a mapping from the EE11 class to the
* EE10 class.
* EE10 class. If there is no mapping the mapping value is reset and the ee11Class is returned.
* @param ee11Class - the EE11 class
* @param tsHome - the path to the TCK home directory
* @return the EE10 class name prefix if the mapping was added, otherwise null
*/
@Override
public String addTestClassMapping(Class<?> ee11Class, Path tsHome) {
// Clear any previous mapping
testClassMappings[0] = "";
testClassMappings[1] = "";
// Check if the class name ends with a number
String ee11Name = ee11Class.getName();
String ee10Name = null;
char lastChar = ee11Name.charAt(ee11Name.length() - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,23 @@ public void test_jpa_core_annotations_orderby() throws IOException {
System.out.printf("Client: %s\n", deploymentInfo.getClientJar());
System.out.printf("Client.mainClass: %s\n", deploymentInfo.getClientJar().getMainClass());
System.out.printf("Client.classes: %s\n", deploymentInfo.getClientJar().getClassFilesString());

System.out.println("---- TestClientFiles ----");
System.out.println(packageInfo.getTestClientFiles());
}

@Test
public void test_jpa_core_entitytest_persist_oneXmany() throws IOException {
TestPackageInfoBuilder builder = new TestPackageInfoBuilder(tsHome);
List<TestMethodInfo> testMethods = Arrays.asList(
new TestMethodInfo("persist1XMTest1", "Exception"),
new TestMethodInfo("persist1XMTest3", "Exception"),
new TestMethodInfo("persist1XMTest4", "Exception")
);
Class<?> baseTestClass = ee.jakarta.tck.persistence.core.entitytest.persist.oneXmany.Client.class;
TestPackageInfo packageInfo = builder.buildTestPackgeInfoEx(baseTestClass, testMethods, DefaultEEMapping.getInstance());
System.out.println(packageInfo);
DeploymentInfo deploymentInfo = packageInfo.getTestClients().get(0).getTestDeployment().getDebugInfo();
System.out.printf("Ejbs: %s\n", deploymentInfo.getEjbJars());
System.out.printf("Ejb1.classes: %s\n", deploymentInfo.getEjbJar().getClassFilesString());

Expand Down

0 comments on commit 03ae086

Please sign in to comment.