initial import

This commit is contained in:
2026-05-11 19:59:10 +07:00
commit 582353e277
479 changed files with 32418 additions and 0 deletions

View File

@ -0,0 +1,58 @@
package com.cmobile.unifiedtms;
import com.haulmont.cuba.testsupport.TestContainer;
import org.junit.jupiter.api.extension.ExtensionContext;
import java.util.ArrayList;
import java.util.Arrays;
public class TmsTestContainer extends TestContainer {
public TmsTestContainer() {
super();
//noinspection ArraysAsListWithZeroOrOneArgument
appComponents = new ArrayList<>(Arrays.asList(
// list add-ons here: "com.haulmont.reports", "com.haulmont.addon.bproc", etc.
"com.haulmont.cuba"
));
appPropertiesFiles = Arrays.asList(
// List the files defined in your web.xml
// in appPropertiesConfig context parameter of the core module
"com/cmobile/unifiedtms/app.properties",
// Add this file which is located in CUBA and defines some properties
// specifically for test environment. You can replace it with your own
// or add another one in the end.
"com/cmobile/unifiedtms/test-app.properties");
autoConfigureDataSource();
}
public static class Common extends TmsTestContainer {
public static final TmsTestContainer.Common INSTANCE = new TmsTestContainer.Common();
private static volatile boolean initialized;
private Common() {
}
@Override
public void beforeAll(ExtensionContext extensionContext) throws Exception {
if (!initialized) {
super.beforeAll(extensionContext);
initialized = true;
}
setupContext();
}
@SuppressWarnings("RedundantThrows")
@Override
public void afterAll(ExtensionContext extensionContext) throws Exception {
cleanupContext();
// never stops - do not call super
}
}
}