Migrated all integration tests in ccm-core to run with the Maven Failsafe Plugin

ccm-docs
Jens Pelzetter 2020-07-14 22:04:22 +02:00
parent a42230f66d
commit 7b2c0e3fbc
28 changed files with 236 additions and 777 deletions

View File

@ -24,8 +24,8 @@ import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.core.UnexpectedErrorException; import org.libreccm.core.UnexpectedErrorException;
import javax.enterprise.inject.Instance; import javax.enterprise.inject.Instance;
import javax.faces.bean.RequestScoped;
import javax.inject.Inject; import javax.inject.Inject;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.Reader; import java.io.Reader;
@ -33,6 +33,8 @@ import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.enterprise.context.RequestScoped;
/** /**
* This class provides access to the (local) file system. If available an * This class provides access to the (local) file system. If available an
* implementation of the {@link FileSystemAdapter} interface is used. The * implementation of the {@link FileSystemAdapter} interface is used. The

View File

@ -122,27 +122,9 @@ public class CategoryManagerIT {
public static WebArchive createDeployment() { public static WebArchive createDeployment() {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.categorization.CategoryManagerTest.war") "LibreCCM-org.libreccm.categorization.CategoryManagerTest.war"
.addPackage(org.libreccm.categorization.Categorization.class )
.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.PermissionChecker.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
@ -393,8 +375,7 @@ public class CategoryManagerIT {
@UsingDataSet("datasets/org/libreccm/categorization/CategoryManagerTest" @UsingDataSet("datasets/org/libreccm/categorization/CategoryManagerTest"
+ "/data.yml") + "/data.yml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
excludeColumns = { excludeColumns = {},
},
value = "datasets/org/libreccm/categorization/CategoryManagerTest" value = "datasets/org/libreccm/categorization/CategoryManagerTest"
+ "/after-remove-obj-from-category.yml" + "/after-remove-obj-from-category.yml"
) )
@ -747,7 +728,7 @@ public class CategoryManagerIT {
/** /**
* Tries to retrieve the index object from several categories and verifies * Tries to retrieve the index object from several categories and verifies
* that the expected object is returned by null null null null null null * that the expected object is returned by null null null null null null
* null null {@link CategoryManager#getIndexObject(org.libreccm.categorization.Category). * null null null null null {@link CategoryManager#getIndexObject(org.libreccm.categorization.Category).
*/ */
@Test @Test
@UsingDataSet( @UsingDataSet(

View File

@ -108,28 +108,11 @@ public class CategoryRepositoryIT {
@Deployment @Deployment
public static WebArchive createDeployment() { public static WebArchive createDeployment() {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(
"LibreCCM-org.libreccm.categorization.CategoryRepositoryTest.war") WebArchive.class,
.addPackage(org.libreccm.categorization.Categorization.class "LibreCCM-org.libreccm.categorization.CategoryRepositoryTest.war"
.getPackage()) )
.addPackage(org.libreccm.configuration.Configuration.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.PermissionChecker.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
@ -247,7 +230,7 @@ public class CategoryRepositoryIT {
final Domain domain = domainRepo.findByDomainKey("test").get(); final Domain domain = domainRepo.findByDomainKey("test").get();
final Optional<Category> doesNotExist = categoryRepo.findByPath(domain, final Optional<Category> doesNotExist = categoryRepo.findByPath(domain,
"/does/not/exist"); "/does/not/exist");
assertThat(doesNotExist.isPresent(), is(false)); assertThat(doesNotExist.isPresent(), is(false));
} }

View File

@ -95,38 +95,21 @@ public class ConfigurationManagerIT {
@Deployment @Deployment
public static WebArchive createDeployment() { public static WebArchive createDeployment() {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(
"LibreCCM-org.libreccm.configuration." WebArchive.class,
+ "ConfigurationManagerTest.war") "LibreCCM-org.libreccm.configuration.ConfigurationManagerTest.war"
.addPackage(org.libreccm.categorization.Categorization.class )
.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm", "com.example")
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class
.getPackage())
.addPackage(org.libreccm.security.Permission.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
getPackage())
.addClass(com.example.TestConfiguration.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource(
"META-INF/persistence.xml") "test-persistence.xml", "META-INF/persistence.xml"
)
.addAsResource( .addAsResource(
"configs/org/libreccm/configuration/ConfigurationManagerTest/" "configs/org/libreccm/configuration/ConfigurationManagerTest/"
+ "log4j2.xml", + "log4j2.xml",
"log4j2.xml") "log4j2.xml"
)
.addAsWebInfResource("test-web.xml", "web.xml") .addAsWebInfResource("test-web.xml", "web.xml")
.addAsWebInfResource("META-INF/beans.xml", "beans.xml"); .addAsWebInfResource("META-INF/beans.xml", "beans.xml");
} }

View File

@ -100,38 +100,15 @@ public class CcmObjectRepositoryIT {
@Deployment @Deployment
public static WebArchive createDeployment() { public static WebArchive createDeployment() {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(
"LibreCCM-org.libreccm.core.CcmObjectRepositoryTest.war") WebArchive.class,
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage()) "LibreCCM-org.libreccm.core.CcmObjectRepositoryTest.war"
.addPackage(org.libreccm.categorization.Categorization.class )
.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.configuration.Configuration.class.
getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addClass(org.libreccm.modules.CcmModule.class)
.addClass(org.libreccm.modules.ModuleEvent.class)
.addClass(org.libreccm.modules.InitEvent.class)
.addClass(org.libreccm.modules.InstallEvent.class)
.addClass(org.libreccm.modules.UnInstallEvent.class)
.addClass(org.libreccm.modules.ShutdownEvent.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addPackage(org.libreccm.security.PermissionChecker.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource(
"META-INF/persistence.xml") "test-persistence.xml", "META-INF/persistence.xml"
)
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsWebInfResource("test-web.xml", "web.xml") .addAsWebInfResource("test-web.xml", "web.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml"); .addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
@ -354,7 +331,8 @@ public class CcmObjectRepositoryIT {
@Test(expected = NullPointerException.class) @Test(expected = NullPointerException.class)
@ShouldThrowException(NullPointerException.class) @ShouldThrowException(NullPointerException.class)
@UsingDataSet("datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml") @UsingDataSet("datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml")
@ShouldMatchDataSet("datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml") @ShouldMatchDataSet(
"datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml")
@InSequence(700) @InSequence(700)
public void deleteNullValue() { public void deleteNullValue() {
ccmObjectRepository.delete(null); ccmObjectRepository.delete(null);

View File

@ -38,7 +38,6 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.configuration.ConfigurationManager; import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.core.UnexpectedErrorException; import org.libreccm.core.UnexpectedErrorException;
@ -209,26 +208,7 @@ public class GroupImportIT {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.imexport.GroupImportTest.war") "LibreCCM-org.libreccm.imexport.GroupImportTest.war")
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.files.CcmFiles.class.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.imexport.Exportable.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.security.Group.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("imports", "imports") .addAsResource("imports", "imports")

View File

@ -38,7 +38,6 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.configuration.ConfigurationManager; import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.core.UnexpectedErrorException; import org.libreccm.core.UnexpectedErrorException;
@ -213,26 +212,7 @@ public class GroupMembershipImportIT {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.imexport.GroupImportTest.war") "LibreCCM-org.libreccm.imexport.GroupImportTest.war")
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.files.CcmFiles.class.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.imexport.Exportable.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.security.Group.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("imports", "imports") .addAsResource("imports", "imports")

View File

@ -38,7 +38,6 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.configuration.ConfigurationManager; import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.core.UnexpectedErrorException; import org.libreccm.core.UnexpectedErrorException;
@ -208,26 +207,7 @@ public class UserImportIT {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.imexport.UserImportTest.war") "LibreCCM-org.libreccm.imexport.UserImportTest.war")
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.files.CcmFiles.class.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.imexport.Exportable.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("imports", "imports") .addAsResource("imports", "imports")

View File

@ -33,10 +33,8 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.configuration.ExampleConfiguration; import org.libreccm.configuration.ExampleConfiguration;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
@ -51,7 +49,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -60,12 +57,12 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class ConfigurationLoaderTest { public class ConfigurationLoaderIT {
@Inject @Inject
private EntityManager entityManager; private EntityManager entityManager;
public ConfigurationLoaderTest() { public ConfigurationLoaderIT() {
} }
@BeforeClass @BeforeClass
@ -89,19 +86,7 @@ public class ConfigurationLoaderTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.modules.ConfigurationLoaderTest.war") "LibreCCM-org.libreccm.modules.ConfigurationLoaderTest.war")
.addPackage(org.libreccm.configuration.Configuration.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addClass(org.libreccm.modules.ConfigurationLoader.class)
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -34,13 +34,11 @@ import static org.junit.Assert.*;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.modules.dependencytree.test.cycle.TestModuleA; import org.libreccm.modules.dependencytree.test.cycle.TestModuleA;
import org.libreccm.modules.dependencytree.test.cycle.TestModuleB; import org.libreccm.modules.dependencytree.test.cycle.TestModuleB;
import org.libreccm.modules.dependencytree.test.cycle.TestModuleC; import org.libreccm.modules.dependencytree.test.cycle.TestModuleC;
import org.libreccm.modules.dependencytree.test.cycle.TestModuleRoot; import org.libreccm.modules.dependencytree.test.cycle.TestModuleRoot;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -51,13 +49,12 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
public class DependencyTreeManagerCycleTest { public class DependencyTreeManagerCycleIT {
private Iterable<CcmModule> modules; private Iterable<CcmModule> modules;
public DependencyTreeManagerCycleTest() { public DependencyTreeManagerCycleIT() {
} }
@BeforeClass @BeforeClass
@ -87,32 +84,7 @@ public class DependencyTreeManagerCycleTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.modules.dependencytree.DependencyTreeManagerCycleTest.war") "LibreCCM-org.libreccm.modules.dependencytree.DependencyTreeManagerCycleTest.war")
.addPackage(org.libreccm.tests.categories.IntegrationTest.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addClass(org.libreccm.modules.DependencyTreeManager.class)
.addClass(org.libreccm.modules.DependencyException.class)
.addClass(org.libreccm.modules.IntegrationException.class)
.addClass(TreeNode.class)
.addClass(org.libreccm.modules.CcmModule.class)
.addClass(org.libreccm.modules.ModuleEvent.class)
.addClass(org.libreccm.modules.ModuleInfo.class)
.addClass(org.libreccm.modules.ModuleStatus.class)
.addClass(org.libreccm.modules.Module.class)
.addClass(org.libreccm.modules.RequiredModule.class)
.addClass(org.libreccm.modules.InitEvent.class)
.addClass(org.libreccm.modules.InstallEvent.class)
.addClass(org.libreccm.modules.ShutdownEvent.class)
.addClass(org.libreccm.modules.UnInstallEvent.class)
.addClass(
org.libreccm.modules.dependencytree.test.cycle.TestModuleRoot.class)
.addClass(
org.libreccm.modules.dependencytree.test.cycle.TestModuleA.class)
.addClass(
org.libreccm.modules.dependencytree.test.cycle.TestModuleB.class)
.addClass(
org.libreccm.modules.dependencytree.test.cycle.TestModuleC.class)
.addPackage(org.libreccm.pagemodel.PageModel.class.getPackage())
.addClass(org.libreccm.web.ApplicationType.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsResource( .addAsResource(

View File

@ -38,9 +38,7 @@ import static org.junit.Assert.*;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -51,13 +49,12 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
public class DependencyTreeManagerTest { public class DependencyTreeManagerIT {
private Iterable<CcmModule> modules; private Iterable<CcmModule> modules;
public DependencyTreeManagerTest() { public DependencyTreeManagerIT() {
} }
@BeforeClass @BeforeClass
@ -100,33 +97,7 @@ public class DependencyTreeManagerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.modules.dependencytree.DependencyTreeManagerTest.war") "LibreCCM-org.libreccm.modules.dependencytree.DependencyTreeManagerTest.war")
.addPackage(org.libreccm.tests.categories.IntegrationTest.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addClass(org.libreccm.modules.DependencyTreeManager.class)
.addClass(org.libreccm.modules.DependencyException.class)
.addClass(org.libreccm.modules.IntegrationException.class)
.addClass(org.libreccm.modules.TreeNode.class)
.addClass(org.libreccm.modules.CcmModule.class)
.addClass(org.libreccm.modules.ModuleEvent.class)
.addClass(org.libreccm.modules.ModuleInfo.class)
.addClass(org.libreccm.modules.ModuleStatus.class)
.addClass(org.libreccm.modules.Module.class)
.addClass(org.libreccm.modules.RequiredModule.class)
.addClass(org.libreccm.modules.InitEvent.class)
.addClass(org.libreccm.modules.InstallEvent.class)
.addClass(org.libreccm.modules.ShutdownEvent.class)
.addClass(org.libreccm.modules.UnInstallEvent.class)
.addClass(
org.libreccm.modules.dependencytree.test.valid.TestModuleRoot.class)
.addClass(
org.libreccm.modules.dependencytree.test.valid.TestModuleA.class)
.addClass(
org.libreccm.modules.dependencytree.test.valid.TestModuleB.class)
.addClass(
org.libreccm.modules.dependencytree.test.valid.TestModuleC.class)
// .addClass(org.libreccm.portation.Portable.class)
.addPackage(org.libreccm.pagemodel.PageModel.class.getPackage())
.addClass(org.libreccm.web.ApplicationType.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsResource( .addAsResource(

View File

@ -36,9 +36,7 @@ import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
import java.io.IOException; import java.io.IOException;
@ -63,7 +61,6 @@ import static org.libreccm.testutils.DependenciesHelpers.getModuleDependencies;
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
* @version created on 12/1/16 * @version created on 12/1/16
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -170,8 +167,6 @@ public class CoreDataImportTest {
.class.getPackage()) .class.getPackage())
.addPackage(org.libreccm.web.CcmApplication .addPackage(org.libreccm.web.CcmApplication
.class.getPackage()) .class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest
.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier .addPackage(org.libreccm.testutils.EqualsVerifier
.class.getPackage()) .class.getPackage())
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())

View File

@ -37,12 +37,10 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.CcmObject; import org.libreccm.core.CcmObject;
import org.libreccm.core.CcmObjectRepository; import org.libreccm.core.CcmObjectRepository;
import org.libreccm.security.authorization.LabBean; import org.libreccm.security.authorization.LabBean;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
@ -58,7 +56,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -67,7 +64,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class AuthorizationInterceptorTest { public class AuthorizationInterceptorIT {
@Inject @Inject
private Subject subject; private Subject subject;
@ -78,7 +75,7 @@ public class AuthorizationInterceptorTest {
@Inject @Inject
private LabBean labBean; private LabBean labBean;
public AuthorizationInterceptorTest() { public AuthorizationInterceptorIT() {
} }
@BeforeClass @BeforeClass
@ -102,37 +99,7 @@ public class AuthorizationInterceptorTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.AuthorizationInterceptorTest.war") "LibreCCM-org.libreccm.security.AuthorizationInterceptorTest.war")
.addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.security.authorization.LabBean.class
.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addPackage(com.arsdigita.runtime.CCMResourceManager.class
.getPackage())
.addPackage(com.arsdigita.web.CCMApplicationContextListener.class
.getPackage())
.addPackage(com.arsdigita.xml.XML.class.getPackage())
.addPackage(com.arsdigita.xml.formatters.DateTimeFormatter.class
.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.util.UncheckedWrapperException.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -36,9 +36,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
@ -56,7 +54,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -65,7 +62,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class ChallengeManagerTest { public class ChallengeManagerIT {
@Inject @Inject
private ChallengeManager challengeManager; private ChallengeManager challengeManager;
@ -82,7 +79,7 @@ public class ChallengeManagerTest {
@Inject @Inject
private Shiro shiro; private Shiro shiro;
public ChallengeManagerTest() { public ChallengeManagerIT() {
} }
@BeforeClass @BeforeClass
@ -106,36 +103,7 @@ public class ChallengeManagerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.ChallengeManagerTest.war") "LibreCCM-org.libreccm.security.ChallengeManagerTest.war")
.addClass(com.arsdigita.runtime.CCMResourceManager.class) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(com.arsdigita.util.Assert.class.getPackage())
.addClass(com.arsdigita.util.servlet.HttpHost.class)
.addPackage(com.arsdigita.web.URL.class.getPackage())
.addPackage(org.libreccm.security.OneTimeAuthManager.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(
org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",

View File

@ -39,9 +39,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import static org.hamcrest.Matchers.*; import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*; import static org.junit.Assert.*;
@ -55,7 +53,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -64,7 +61,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class GroupManagerTest { public class GroupManagerIT {
@Inject @Inject
private GroupManager groupManager; private GroupManager groupManager;
@ -78,7 +75,7 @@ public class GroupManagerTest {
@Inject @Inject
private Shiro shiro; private Shiro shiro;
public GroupManagerTest() { public GroupManagerIT() {
} }
@BeforeClass @BeforeClass
@ -102,30 +99,7 @@ public class GroupManagerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.GroupManagerTest.war") "LibreCCM-org.libreccm.security.GroupManagerTest.war")
.addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(
org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage()).
addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -50,18 +50,16 @@ import org.jboss.arquillian.persistence.CleanupUsingScript;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.Optional; import java.util.Optional;
import org.jboss.arquillian.persistence.TestExecutionPhase; import org.jboss.arquillian.persistence.TestExecutionPhase;
/** /**
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -70,7 +68,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class GroupRepositoryTest { public class GroupRepositoryIT {
private static final String ADMINS = "admins"; private static final String ADMINS = "admins";
private static final String USERS = "users"; private static final String USERS = "users";
@ -83,7 +81,7 @@ public class GroupRepositoryTest {
@PersistenceContext @PersistenceContext
private EntityManager entityManager; private EntityManager entityManager;
public GroupRepositoryTest() { public GroupRepositoryIT() {
} }
@ -108,24 +106,7 @@ public class GroupRepositoryTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.UserRepositoryTest.war") "LibreCCM-org.libreccm.security.UserRepositoryTest.war")
.addPackage(org.libreccm.security.User.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",

View File

@ -44,9 +44,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.List; import java.util.List;
@ -62,7 +60,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -71,7 +68,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class OneTimeAuthManagerTest { public class OneTimeAuthManagerIT {
@Inject @Inject
private OneTimeAuthManager oneTimeAuthManager; private OneTimeAuthManager oneTimeAuthManager;
@ -82,7 +79,7 @@ public class OneTimeAuthManagerTest {
@Inject @Inject
private Shiro shiro; private Shiro shiro;
public OneTimeAuthManagerTest() { public OneTimeAuthManagerIT() {
} }
@ -107,29 +104,7 @@ public class OneTimeAuthManagerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.OneTimeAuthManagerTest.war") "LibreCCM-org.libreccm.security.OneTimeAuthManagerTest.war")
.addPackage(org.libreccm.security.OneTimeAuthManager.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
@ -214,9 +189,9 @@ public class OneTimeAuthManagerTest {
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute( final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
() -> { () -> {
return oneTimeAuthManager.retrieveForUser( return oneTimeAuthManager.retrieveForUser(
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION); jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
}); });
assertThat(result, is(not(nullValue()))); assertThat(result, is(not(nullValue())));
assertThat(result, is(not(empty()))); assertThat(result, is(not(empty())));
@ -237,9 +212,9 @@ public class OneTimeAuthManagerTest {
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute( final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
() -> { () -> {
return oneTimeAuthManager.retrieveForUser( return oneTimeAuthManager.retrieveForUser(
mmuster, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION); mmuster, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
}); });
assertThat(result, is(empty())); assertThat(result, is(empty()));
} }
@ -284,11 +259,11 @@ public class OneTimeAuthManagerTest {
shiro.getSystemUser().execute( shiro.getSystemUser().execute(
() -> { () -> {
assertThat( assertThat(
oneTimeAuthManager.validTokenExistsForUser( oneTimeAuthManager.validTokenExistsForUser(
user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION), user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION),
is(true)); is(true));
}); });
} }
@Test @Test
@ -300,11 +275,11 @@ public class OneTimeAuthManagerTest {
shiro.getSystemUser().execute( shiro.getSystemUser().execute(
() -> { () -> {
assertThat( assertThat(
oneTimeAuthManager.validTokenExistsForUser( oneTimeAuthManager.validTokenExistsForUser(
user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION), user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION),
is(false)); is(false));
}); });
} }
@Test(expected = IllegalArgumentException.class) @Test(expected = IllegalArgumentException.class)
@ -346,15 +321,15 @@ public class OneTimeAuthManagerTest {
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute( final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
() -> { () -> {
return oneTimeAuthManager.retrieveForUser( return oneTimeAuthManager.retrieveForUser(
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION); jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
}); });
assertThat(result, is(not(empty()))); assertThat(result, is(not(empty())));
shiro.getSystemUser().execute( shiro.getSystemUser().execute(
() -> { () -> {
assertThat(oneTimeAuthManager.isValid(result.get(0)), assertThat(oneTimeAuthManager.isValid(result.get(0)),
is(true)); is(true));
}); });
} }
@Test @Test
@ -366,9 +341,9 @@ public class OneTimeAuthManagerTest {
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute( final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
() -> { () -> {
return oneTimeAuthManager.retrieveForUser( return oneTimeAuthManager.retrieveForUser(
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION); jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
}); });
assertThat(result, is(not(empty()))); assertThat(result, is(not(empty())));
final OneTimeAuthToken token = result.get(0); final OneTimeAuthToken token = result.get(0);
@ -379,8 +354,8 @@ public class OneTimeAuthManagerTest {
shiro.getSystemUser().execute( shiro.getSystemUser().execute(
() -> { () -> {
assertThat(oneTimeAuthManager.isValid(token), is(false)); assertThat(oneTimeAuthManager.isValid(token), is(false));
}); });
} }
@ -410,9 +385,9 @@ public class OneTimeAuthManagerTest {
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute( final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
() -> { () -> {
return oneTimeAuthManager.retrieveForUser( return oneTimeAuthManager.retrieveForUser(
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION); jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
}); });
assertThat(result, is(not(empty()))); assertThat(result, is(not(empty())));
shiro.getSystemUser().execute( shiro.getSystemUser().execute(

View File

@ -36,10 +36,8 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.EmailAddress; import org.libreccm.core.EmailAddress;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
@ -59,7 +57,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -68,11 +65,14 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class PartyRepositoryTest { public class PartyRepositoryIT {
private static final String MMUSTER = "mmuster"; private static final String MMUSTER = "mmuster";
private static final String JDOE = "jdoe"; private static final String JDOE = "jdoe";
private static final String ADMINS = "admins"; private static final String ADMINS = "admins";
private static final String MANAGERS = "managers"; private static final String MANAGERS = "managers";
@Inject @Inject
@ -84,7 +84,7 @@ public class PartyRepositoryTest {
@PersistenceContext @PersistenceContext
private EntityManager entityManager; private EntityManager entityManager;
public PartyRepositoryTest() { public PartyRepositoryIT() {
} }
@BeforeClass @BeforeClass
@ -108,29 +108,7 @@ public class PartyRepositoryTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.UserRepositoryTest.war") "LibreCCM-org.libreccm.security.UserRepositoryTest.war")
.addPackage(org.libreccm.security.User.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(
org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class
.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",

View File

@ -44,11 +44,9 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.CcmObject; import org.libreccm.core.CcmObject;
import org.libreccm.core.CcmObjectRepository; import org.libreccm.core.CcmObjectRepository;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -65,7 +63,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -74,7 +71,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class PermissionCheckerTest { public class PermissionCheckerIT {
@Inject @Inject
private Subject subject; private Subject subject;
@ -88,7 +85,7 @@ public class PermissionCheckerTest {
@Inject @Inject
private CcmObjectRepository objectRepository; private CcmObjectRepository objectRepository;
public PermissionCheckerTest() { public PermissionCheckerIT() {
} }
@BeforeClass @BeforeClass
@ -112,27 +109,7 @@ public class PermissionCheckerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.PermissionCheckerTest.war") "LibreCCM-org.libreccm.security.PermissionCheckerTest.war")
.addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(com.arsdigita.kernel.KernelConfig.class
.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addClass(org.libreccm.imexport.Exportable.class) .addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",

View File

@ -36,11 +36,9 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.CcmObject; import org.libreccm.core.CcmObject;
import org.libreccm.core.CcmObjectRepository; import org.libreccm.core.CcmObjectRepository;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
@ -55,6 +53,7 @@ import org.libreccm.categorization.CategorizationConstants;
import org.libreccm.core.CoreConstants; import org.libreccm.core.CoreConstants;
import java.util.List; import java.util.List;
import org.jboss.arquillian.persistence.TestExecutionPhase; import org.jboss.arquillian.persistence.TestExecutionPhase;
/** /**
@ -63,7 +62,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -72,7 +70,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class PermissionManagerTest { public class PermissionManagerIT {
@Inject @Inject
private PermissionManager permissionManager; private PermissionManager permissionManager;
@ -89,7 +87,7 @@ public class PermissionManagerTest {
@Inject @Inject
private Shiro shiro; private Shiro shiro;
public PermissionManagerTest() { public PermissionManagerIT() {
} }
@BeforeClass @BeforeClass
@ -112,29 +110,8 @@ public class PermissionManagerTest {
public static WebArchive createDeployment() { public static WebArchive createDeployment() {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.PermissionManagerTest.war"). "LibreCCM-org.libreccm.security.PermissionManagerTest.war")
addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage()).
addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(com.arsdigita.kernel.KernelConfig.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -36,9 +36,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import javax.inject.Inject; import javax.inject.Inject;
@ -54,7 +52,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -63,7 +60,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class RoleManagerTest { public class RoleManagerIT {
@Inject @Inject
private RoleManager roleManager; private RoleManager roleManager;
@ -77,7 +74,7 @@ public class RoleManagerTest {
@Inject @Inject
private Shiro shiro; private Shiro shiro;
public RoleManagerTest() { public RoleManagerIT() {
} }
@BeforeClass @BeforeClass
@ -101,27 +98,7 @@ public class RoleManagerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.RoleManagerTest.war") "LibreCCM-org.libreccm.security.RoleManagerTest.war")
.addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(com.arsdigita.kernel.KernelConfig.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class) .addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
@ -204,7 +181,7 @@ public class RoleManagerTest {
@UsingDataSet("datasets/org/libreccm/security/RoleManagerTest/data.yml") @UsingDataSet("datasets/org/libreccm/security/RoleManagerTest/data.yml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value value
= "datasets/org/libreccm/security/RoleManagerTest/after-remove.yml", = "datasets/org/libreccm/security/RoleManagerTest/after-remove.yml",
excludeColumns = {"membership_id"}) excludeColumns = {"membership_id"})
@InSequence(300) @InSequence(300)
public void removeRoleFromParty() { public void removeRoleFromParty() {

View File

@ -36,9 +36,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.List; import java.util.List;
@ -65,7 +63,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -74,7 +71,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class RoleRepositoryTest { public class RoleRepositoryIT {
private static final String ADMINISTRATOR = "administrator"; private static final String ADMINISTRATOR = "administrator";
private static final String USER = "user"; private static final String USER = "user";
@ -89,7 +86,7 @@ public class RoleRepositoryTest {
@PersistenceContext @PersistenceContext
private EntityManager entityManager; private EntityManager entityManager;
public RoleRepositoryTest() { public RoleRepositoryIT() {
} }
@BeforeClass @BeforeClass
@ -113,24 +110,7 @@ public class RoleRepositoryTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.RoleRepositoryTest.war") "LibreCCM-org.libreccm.security.RoleRepositoryTest.war")
.addPackage(org.libreccm.security.User.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(
org.libreccm.configuration.ConfigurationManager.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage()).
addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addClass(org.libreccm.imexport.Exportable.class) .addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")

View File

@ -19,6 +19,8 @@
package org.libreccm.security; package org.libreccm.security;
import static org.libreccm.testutils.DependenciesHelpers.getModuleDependencies;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
@ -43,25 +45,24 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.CcmObject; import org.libreccm.core.CcmObject;
import org.libreccm.core.CcmObjectRepository; import org.libreccm.core.CcmObjectRepository;
import org.libreccm.tests.categories.IntegrationTest;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.libreccm.testutils.DependenciesHelpers.*;
import org.jboss.arquillian.persistence.CleanupUsingScript; import org.jboss.arquillian.persistence.CleanupUsingScript;
import org.jboss.arquillian.persistence.TestExecutionPhase; import org.jboss.arquillian.persistence.TestExecutionPhase;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
/** /**
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -70,7 +71,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class SecuredCollectionTest { public class SecuredCollectionIT {
private static final String ACCESS_DENIED = "Access denied"; private static final String ACCESS_DENIED = "Access denied";
@ -87,7 +88,7 @@ public class SecuredCollectionTest {
private SecuredCollection<CcmObject> collection2; private SecuredCollection<CcmObject> collection2;
private SecuredCollection<CcmObject> collection3; private SecuredCollection<CcmObject> collection3;
public SecuredCollectionTest() { public SecuredCollectionIT() {
} }
@BeforeClass @BeforeClass
@ -129,27 +130,7 @@ public class SecuredCollectionTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.SecuredCollectionTest.war") "LibreCCM-org.libreccm.security.SecuredCollectionTest.war")
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(com.arsdigita.kernel.KernelConfig.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -18,7 +18,6 @@
*/ */
package org.libreccm.security; package org.libreccm.security;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.Deployment;
@ -37,11 +36,9 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.CcmObject; import org.libreccm.core.CcmObject;
import org.libreccm.core.CcmObjectRepository; import org.libreccm.core.CcmObjectRepository;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
@ -62,7 +59,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -71,7 +67,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class SecuredIteratorTest { public class SecuredIteratorIT {
private static final String ACCESS_DENIED = "Access denied"; private static final String ACCESS_DENIED = "Access denied";
@ -86,10 +82,12 @@ public class SecuredIteratorTest {
//private List<CcmObject> list; //private List<CcmObject> list;
private Iterator<CcmObject> iterator1; private Iterator<CcmObject> iterator1;
private Iterator<CcmObject> iterator2; private Iterator<CcmObject> iterator2;
private Iterator<CcmObject> iterator3; private Iterator<CcmObject> iterator3;
public SecuredIteratorTest() { public SecuredIteratorIT() {
} }
@BeforeClass @BeforeClass
@ -131,27 +129,7 @@ public class SecuredIteratorTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.SecuredIteratorTest.war") "LibreCCM-org.libreccm.security.SecuredIteratorTest.war")
.addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addPackage(com.arsdigita.kernel.KernelConfig.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -44,9 +44,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import static org.hamcrest.Matchers.*; import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*; import static org.junit.Assert.*;
@ -60,7 +58,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -69,12 +66,12 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class ShiroTest { public class ShiroIT {
@Inject @Inject
private Subject subject; private Subject subject;
public ShiroTest() { public ShiroIT() {
} }
@BeforeClass @BeforeClass
@ -115,8 +112,6 @@ public class ShiroTest {
.addClass(org.libreccm.modules.UnInstallEvent.class) .addClass(org.libreccm.modules.UnInstallEvent.class)
.addClass(org.libreccm.modules.ShutdownEvent.class) .addClass(org.libreccm.modules.ShutdownEvent.class)
.addPackage(org.libreccm.security.User.class.getPackage()) .addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class.getPackage()) .addPackage(org.libreccm.testutils.EqualsVerifier.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage()) .addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage()) .addPackage(org.libreccm.workflow.Workflow.class.getPackage())

View File

@ -24,8 +24,6 @@ import javax.inject.Inject;
import org.hibernate.exception.ConstraintViolationException; import org.hibernate.exception.ConstraintViolationException;
import static org.hamcrest.Matchers.*;
import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.ShouldThrowException; import org.jboss.arquillian.container.test.api.ShouldThrowException;
import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.junit.Arquillian;
@ -44,9 +42,7 @@ import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.tests.categories.IntegrationTest;
import static org.junit.Assert.*; import static org.junit.Assert.*;
@ -55,11 +51,14 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
import org.jboss.arquillian.persistence.CleanupUsingScript; import org.jboss.arquillian.persistence.CleanupUsingScript;
import org.jboss.arquillian.persistence.TestExecutionPhase; import org.jboss.arquillian.persistence.TestExecutionPhase;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
/** /**
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -68,7 +67,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class UserManagerTest { public class UserManagerIT {
@Inject @Inject
private UserManager userManager; private UserManager userManager;
@ -79,7 +78,7 @@ public class UserManagerTest {
@Inject @Inject
private Shiro shiro; private Shiro shiro;
public UserManagerTest() { public UserManagerIT() {
} }
@BeforeClass @BeforeClass
@ -103,29 +102,7 @@ public class UserManagerTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.UserManagerTest.war") "LibreCCM-org.libreccm.security.UserManagerTest.war")
.addPackage(org.libreccm.categorization.Categorization.class .addPackages(true, "com.arsdigita", "org.libreccm")
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.security.User.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(com.arsdigita.kernel.KernelConfig.class.getPackage())
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",
"META-INF/persistence.xml") "META-INF/persistence.xml")

View File

@ -20,8 +20,6 @@ package org.libreccm.security;
import org.junit.Test; import org.junit.Test;
import static org.hamcrest.Matchers.*;
import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.ShouldThrowException; import org.jboss.arquillian.container.test.api.ShouldThrowException;
import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.junit.Arquillian;
@ -44,10 +42,8 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
import org.jboss.arquillian.persistence.CleanupUsingScript; import org.jboss.arquillian.persistence.CleanupUsingScript;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.libreccm.core.EmailAddress; import org.libreccm.core.EmailAddress;
import org.libreccm.tests.categories.IntegrationTest;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@ -55,13 +51,18 @@ import java.util.Optional;
import javax.inject.Inject; import javax.inject.Inject;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContext;
import org.jboss.arquillian.persistence.TestExecutionPhase; import org.jboss.arquillian.persistence.TestExecutionPhase;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
/** /**
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Category(IntegrationTest.class)
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
@PersistenceTest @PersistenceTest
@Transactional(TransactionMode.COMMIT) @Transactional(TransactionMode.COMMIT)
@ -70,11 +71,14 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
"003_init_hibernate_sequence.sql"}) "003_init_hibernate_sequence.sql"})
@CleanupUsingScript(value = {"999_cleanup.sql"}, @CleanupUsingScript(value = {"999_cleanup.sql"},
phase = TestExecutionPhase.BEFORE) phase = TestExecutionPhase.BEFORE)
public class UserRepositoryTest { public class UserRepositoryIT {
private static final String NOBODY = "nobody"; private static final String NOBODY = "nobody";
private static final String JOE = "joe"; private static final String JOE = "joe";
private static final String MMUSTER = "mmuster"; private static final String MMUSTER = "mmuster";
private static final String JDOE = "jdoe"; private static final String JDOE = "jdoe";
@Inject @Inject
@ -86,7 +90,7 @@ public class UserRepositoryTest {
@PersistenceContext @PersistenceContext
private EntityManager entityManager; private EntityManager entityManager;
public UserRepositoryTest() { public UserRepositoryIT() {
} }
@BeforeClass @BeforeClass
@ -110,27 +114,7 @@ public class UserRepositoryTest {
return ShrinkWrap return ShrinkWrap
.create(WebArchive.class, .create(WebArchive.class,
"LibreCCM-org.libreccm.security.UserRepositoryTest.war") "LibreCCM-org.libreccm.security.UserRepositoryTest.war")
.addPackage(org.libreccm.security.User.class.getPackage()) .addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.core.CcmObject.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
.getPackage())
.addPackage(org.libreccm.testutils.EqualsVerifier.class
.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addAsLibraries(getModuleDependencies()) .addAsLibraries(getModuleDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini") .addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource("test-persistence.xml", .addAsResource("test-persistence.xml",

View File

@ -20,7 +20,7 @@ package org.libreccm.security.authorization;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.libreccm.core.CcmObject; import org.libreccm.core.CcmObject;
import org.libreccm.security.AuthorizationInterceptorTest; import org.libreccm.security.AuthorizationInterceptorIT;
import org.libreccm.security.AuthorizationRequired; import org.libreccm.security.AuthorizationRequired;
import org.libreccm.security.RequiresPrivilege; import org.libreccm.security.RequiresPrivilege;
import org.libreccm.security.RequiresRole; import org.libreccm.security.RequiresRole;
@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*; import static org.junit.Assert.*;
/** /**
* A simple bean used by the {@link AuthorizationInterceptorTest}. * A simple bean used by the {@link AuthorizationInterceptorIT}.
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */