diff --git a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAccessTest.kt b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAccessTest.kt index bf9b282051..7ed22fa6e3 100644 --- a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAccessTest.kt +++ b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAccessTest.kt @@ -26,7 +26,6 @@ package org.projectforge.plugins.datatransfer import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.mockito.Mockito -import org.projectforge.framework.persistence.jpa.MyJpaWithExtLibrariesScanner import org.projectforge.framework.persistence.user.entities.PFUserDO import org.projectforge.jcr.FileObject import org.projectforge.plugins.datatransfer.rest.DataTransferPageRest @@ -48,10 +47,7 @@ class DataTransferAccessTest : AbstractTestBase() { private var initialized = false init { - MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode( - DataTransferAreaDO::class.java.canonicalName, - DataTransferAuditDO::class.java.canonicalName, - ) + DataTransferTestService.addPluginEntitiesForTestMode() } @PostConstruct diff --git a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAuditDaoTest.kt b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAuditDaoTest.kt index fc98083c79..4e15fc9448 100644 --- a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAuditDaoTest.kt +++ b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAuditDaoTest.kt @@ -26,7 +26,6 @@ package org.projectforge.plugins.datatransfer import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.projectforge.framework.jcr.AttachmentsEventType -import org.projectforge.framework.persistence.jpa.MyJpaWithExtLibrariesScanner import org.projectforge.framework.time.PFDateTime import org.projectforge.test.AbstractTestBase import org.springframework.beans.factory.annotation.Autowired @@ -43,10 +42,7 @@ class DataTransferAuditDaoTest : AbstractTestBase() { private lateinit var dataTransferAreaDao: DataTransferAreaDao init { - MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode( - DataTransferAreaDO::class.java.canonicalName, - DataTransferAuditDO::class.java.canonicalName, - ) + DataTransferTestService.addPluginEntitiesForTestMode() } @Test diff --git a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferJCRCleanUpJobTest.kt b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferJCRCleanUpJobTest.kt index 87b2585048..6ece3d6b1a 100644 --- a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferJCRCleanUpJobTest.kt +++ b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferJCRCleanUpJobTest.kt @@ -25,7 +25,6 @@ package org.projectforge.plugins.datatransfer import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test -import org.projectforge.framework.persistence.jpa.MyJpaWithExtLibrariesScanner import org.projectforge.jcr.FileObject import org.projectforge.jcr.RepoService import org.projectforge.plugins.datatransfer.rest.DataTransferAreaPagesRest @@ -51,8 +50,7 @@ class DataTransferJCRCleanUpJobTest : AbstractTestBase() { private lateinit var dataTransferTestService: DataTransferTestService init { - MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode(DataTransferAreaDO::class.java.canonicalName, DataTransferAuditDO::class.java.canonicalName) - initJCRTestRepo(MODUL_NAME, "cleanUpTestRepo") + DataTransferTestService.addPluginEntitiesForTestMode() } @Test diff --git a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferNotificationMailTest.kt b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferNotificationMailTest.kt index 4bec030e52..d180778666 100644 --- a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferNotificationMailTest.kt +++ b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferNotificationMailTest.kt @@ -29,7 +29,6 @@ import org.junit.jupiter.api.Test import org.projectforge.business.configuration.DomainService import org.projectforge.framework.jcr.Attachment import org.projectforge.framework.jcr.AttachmentsEventType -import org.projectforge.framework.persistence.jpa.MyJpaWithExtLibrariesScanner import org.projectforge.framework.persistence.user.entities.PFUserDO import org.projectforge.framework.time.PFDateTime import org.projectforge.jcr.FileInfo @@ -50,10 +49,7 @@ class DataTransferNotificationMailTest : AbstractTestBase() { private lateinit var dataTransferNotificationMailService: DataTransferNotificationMailService init { - MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode( - DataTransferAreaDO::class.java.canonicalName, - DataTransferAuditDO::class.java.canonicalName, - ) + DataTransferTestService.addPluginEntitiesForTestMode() } @Test diff --git a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferPublicAccessTest.kt b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferPublicAccessTest.kt index b2930c22c1..67b93c8c7d 100644 --- a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferPublicAccessTest.kt +++ b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferPublicAccessTest.kt @@ -29,7 +29,6 @@ import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.mockito.Mockito import org.projectforge.framework.jcr.AttachmentsService -import org.projectforge.framework.persistence.jpa.MyJpaWithExtLibrariesScanner import org.projectforge.jcr.FileObject import org.projectforge.plugins.datatransfer.restPublic.DataTransferPublicPageRest import org.projectforge.plugins.datatransfer.restPublic.DataTransferPublicServicesRest @@ -57,7 +56,7 @@ class DataTransferPublicAccessTest : AbstractTestBase() { private lateinit var dataTransferPublicSession: DataTransferPublicSession init { - MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode(DataTransferAreaDO::class.java.canonicalName) + DataTransferTestService.addPluginEntitiesForTestMode() } @PostConstruct diff --git a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferTestService.kt b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferTestService.kt index 14aca301b3..4423f7d7f1 100644 --- a/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferTestService.kt +++ b/plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferTestService.kt @@ -67,7 +67,7 @@ class DataTransferTestService { private lateinit var pluginAdminService: PluginAdminService init { - MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode(DataTransferAreaDO::class.java.canonicalName) + addPluginEntitiesForTestMode() } @PostConstruct @@ -150,6 +150,13 @@ class DataTransferTestService { } companion object { + internal fun addPluginEntitiesForTestMode() { + MyJpaWithExtLibrariesScanner.addPluginEntitiesForTestMode( + DataTransferAreaDO::class.java.canonicalName, + DataTransferAuditDO::class.java.canonicalName, + ) + } + internal fun checkZipArchive(byteArray: ByteArray): List { val result = mutableListOf() ZipInputStream(ByteArrayInputStream(byteArray)).use {