Migrated all integration tests in ccm-core to run with the Maven Failsafe Plugin
parent
a42230f66d
commit
7b2c0e3fbc
|
|
@ -24,8 +24,8 @@ import org.libreccm.configuration.ConfigurationManager;
|
|||
import org.libreccm.core.UnexpectedErrorException;
|
||||
|
||||
import javax.enterprise.inject.Instance;
|
||||
import javax.faces.bean.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Reader;
|
||||
|
|
@ -33,6 +33,8 @@ import java.io.Writer;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
* This class provides access to the (local) file system. If available an
|
||||
* implementation of the {@link FileSystemAdapter} interface is used. The
|
||||
|
|
|
|||
|
|
@ -122,27 +122,9 @@ public class CategoryManagerIT {
|
|||
public static WebArchive createDeployment() {
|
||||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.categorization.CategoryManagerTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.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.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)
|
||||
"LibreCCM-org.libreccm.categorization.CategoryManagerTest.war"
|
||||
)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -393,8 +375,7 @@ public class CategoryManagerIT {
|
|||
@UsingDataSet("datasets/org/libreccm/categorization/CategoryManagerTest"
|
||||
+ "/data.yml")
|
||||
@ShouldMatchDataSet(
|
||||
excludeColumns = {
|
||||
},
|
||||
excludeColumns = {},
|
||||
value = "datasets/org/libreccm/categorization/CategoryManagerTest"
|
||||
+ "/after-remove-obj-from-category.yml"
|
||||
)
|
||||
|
|
@ -747,7 +728,7 @@ public class CategoryManagerIT {
|
|||
/**
|
||||
* Tries to retrieve the index object from several categories and verifies
|
||||
* 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
|
||||
@UsingDataSet(
|
||||
|
|
|
|||
|
|
@ -108,28 +108,11 @@ public class CategoryRepositoryIT {
|
|||
@Deployment
|
||||
public static WebArchive createDeployment() {
|
||||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.categorization.CategoryRepositoryTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.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.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)
|
||||
.create(
|
||||
WebArchive.class,
|
||||
"LibreCCM-org.libreccm.categorization.CategoryRepositoryTest.war"
|
||||
)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -247,7 +230,7 @@ public class CategoryRepositoryIT {
|
|||
final Domain domain = domainRepo.findByDomainKey("test").get();
|
||||
|
||||
final Optional<Category> doesNotExist = categoryRepo.findByPath(domain,
|
||||
"/does/not/exist");
|
||||
"/does/not/exist");
|
||||
|
||||
assertThat(doesNotExist.isPresent(), is(false));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,38 +95,21 @@ public class ConfigurationManagerIT {
|
|||
@Deployment
|
||||
public static WebArchive createDeployment() {
|
||||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.configuration."
|
||||
+ "ConfigurationManagerTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.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.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())
|
||||
.create(
|
||||
WebArchive.class,
|
||||
"LibreCCM-org.libreccm.configuration.ConfigurationManagerTest.war"
|
||||
)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm", "com.example")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
.addAsResource(
|
||||
"test-persistence.xml", "META-INF/persistence.xml"
|
||||
)
|
||||
.addAsResource(
|
||||
"configs/org/libreccm/configuration/ConfigurationManagerTest/"
|
||||
+ "log4j2.xml",
|
||||
"log4j2.xml")
|
||||
"log4j2.xml"
|
||||
)
|
||||
.addAsWebInfResource("test-web.xml", "web.xml")
|
||||
.addAsWebInfResource("META-INF/beans.xml", "beans.xml");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,38 +100,15 @@ public class CcmObjectRepositoryIT {
|
|||
@Deployment
|
||||
public static WebArchive createDeployment() {
|
||||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.core.CcmObjectRepositoryTest.war")
|
||||
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
|
||||
.addPackage(org.libreccm.categorization.Categorization.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())
|
||||
.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())
|
||||
.create(
|
||||
WebArchive.class,
|
||||
"LibreCCM-org.libreccm.core.CcmObjectRepositoryTest.war"
|
||||
)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
.addAsResource(
|
||||
"test-persistence.xml", "META-INF/persistence.xml"
|
||||
)
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsWebInfResource("test-web.xml", "web.xml")
|
||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
|
||||
|
|
@ -354,7 +331,8 @@ public class CcmObjectRepositoryIT {
|
|||
@Test(expected = NullPointerException.class)
|
||||
@ShouldThrowException(NullPointerException.class)
|
||||
@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)
|
||||
public void deleteNullValue() {
|
||||
ccmObjectRepository.delete(null);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.configuration.ConfigurationManager;
|
||||
import org.libreccm.core.UnexpectedErrorException;
|
||||
|
|
@ -209,26 +208,7 @@ public class GroupImportIT {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.imexport.GroupImportTest.war")
|
||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("imports", "imports")
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.configuration.ConfigurationManager;
|
||||
import org.libreccm.core.UnexpectedErrorException;
|
||||
|
|
@ -213,26 +212,7 @@ public class GroupMembershipImportIT {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.imexport.GroupImportTest.war")
|
||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("imports", "imports")
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.configuration.ConfigurationManager;
|
||||
import org.libreccm.core.UnexpectedErrorException;
|
||||
|
|
@ -208,26 +207,7 @@ public class UserImportIT {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.imexport.UserImportTest.war")
|
||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("imports", "imports")
|
||||
|
|
|
|||
|
|
@ -33,10 +33,8 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.configuration.ExampleConfiguration;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import javax.inject.Inject;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -60,12 +57,12 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class ConfigurationLoaderTest {
|
||||
public class ConfigurationLoaderIT {
|
||||
|
||||
@Inject
|
||||
private EntityManager entityManager;
|
||||
|
||||
public ConfigurationLoaderTest() {
|
||||
public ConfigurationLoaderIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -89,19 +86,7 @@ public class ConfigurationLoaderTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.modules.ConfigurationLoaderTest.war")
|
||||
.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())
|
||||
.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())
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -34,13 +34,11 @@ import static org.junit.Assert.*;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.modules.dependencytree.test.cycle.TestModuleA;
|
||||
import org.libreccm.modules.dependencytree.test.cycle.TestModuleB;
|
||||
import org.libreccm.modules.dependencytree.test.cycle.TestModuleC;
|
||||
import org.libreccm.modules.dependencytree.test.cycle.TestModuleRoot;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
public class DependencyTreeManagerCycleTest {
|
||||
public class DependencyTreeManagerCycleIT {
|
||||
|
||||
private Iterable<CcmModule> modules;
|
||||
|
||||
public DependencyTreeManagerCycleTest() {
|
||||
public DependencyTreeManagerCycleIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -87,32 +84,7 @@ public class DependencyTreeManagerCycleTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.modules.dependencytree.DependencyTreeManagerCycleTest.war")
|
||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
|
||||
.addAsResource(
|
||||
|
|
@ -38,9 +38,7 @@ import static org.junit.Assert.*;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
public class DependencyTreeManagerTest {
|
||||
public class DependencyTreeManagerIT {
|
||||
|
||||
private Iterable<CcmModule> modules;
|
||||
|
||||
public DependencyTreeManagerTest() {
|
||||
public DependencyTreeManagerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -100,33 +97,7 @@ public class DependencyTreeManagerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.modules.dependencytree.DependencyTreeManagerTest.war")
|
||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
|
||||
.addAsResource(
|
||||
|
|
@ -36,9 +36,7 @@ import org.junit.Assert;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import javax.inject.Inject;
|
||||
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>
|
||||
* @version created on 12/1/16
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -170,8 +167,6 @@ public class CoreDataImportTest {
|
|||
.class.getPackage())
|
||||
.addPackage(org.libreccm.web.CcmApplication
|
||||
.class.getPackage())
|
||||
.addPackage(org.libreccm.tests.categories.IntegrationTest
|
||||
.class.getPackage())
|
||||
.addPackage(org.libreccm.testutils.EqualsVerifier
|
||||
.class.getPackage())
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
|
|
|
|||
|
|
@ -37,12 +37,10 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.CcmObject;
|
||||
import org.libreccm.core.CcmObjectRepository;
|
||||
import org.libreccm.security.authorization.LabBean;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -67,7 +64,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class AuthorizationInterceptorTest {
|
||||
public class AuthorizationInterceptorIT {
|
||||
|
||||
@Inject
|
||||
private Subject subject;
|
||||
|
|
@ -78,7 +75,7 @@ public class AuthorizationInterceptorTest {
|
|||
@Inject
|
||||
private LabBean labBean;
|
||||
|
||||
public AuthorizationInterceptorTest() {
|
||||
public AuthorizationInterceptorIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -102,37 +99,7 @@ public class AuthorizationInterceptorTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.AuthorizationInterceptorTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -36,9 +36,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import javax.inject.Inject;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -65,7 +62,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class ChallengeManagerTest {
|
||||
public class ChallengeManagerIT {
|
||||
|
||||
@Inject
|
||||
private ChallengeManager challengeManager;
|
||||
|
|
@ -82,7 +79,7 @@ public class ChallengeManagerTest {
|
|||
@Inject
|
||||
private Shiro shiro;
|
||||
|
||||
public ChallengeManagerTest() {
|
||||
public ChallengeManagerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -106,36 +103,7 @@ public class ChallengeManagerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.ChallengeManagerTest.war")
|
||||
.addClass(com.arsdigita.runtime.CCMResourceManager.class)
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -39,9 +39,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -64,7 +61,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class GroupManagerTest {
|
||||
public class GroupManagerIT {
|
||||
|
||||
@Inject
|
||||
private GroupManager groupManager;
|
||||
|
|
@ -78,7 +75,7 @@ public class GroupManagerTest {
|
|||
@Inject
|
||||
private Shiro shiro;
|
||||
|
||||
public GroupManagerTest() {
|
||||
public GroupManagerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -102,30 +99,7 @@ public class GroupManagerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.GroupManagerTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.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.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -50,18 +50,16 @@ import org.jboss.arquillian.persistence.CleanupUsingScript;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -70,7 +68,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class GroupRepositoryTest {
|
||||
public class GroupRepositoryIT {
|
||||
|
||||
private static final String ADMINS = "admins";
|
||||
private static final String USERS = "users";
|
||||
|
|
@ -83,7 +81,7 @@ public class GroupRepositoryTest {
|
|||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
public GroupRepositoryTest() {
|
||||
public GroupRepositoryIT() {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -108,24 +106,7 @@ public class GroupRepositoryTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.UserRepositoryTest.war")
|
||||
.addPackage(org.libreccm.security.User.class.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())
|
||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
||||
.getPackage())
|
||||
.addClass(org.libreccm.imexport.Exportable.class)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -44,9 +44,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -71,7 +68,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class OneTimeAuthManagerTest {
|
||||
public class OneTimeAuthManagerIT {
|
||||
|
||||
@Inject
|
||||
private OneTimeAuthManager oneTimeAuthManager;
|
||||
|
|
@ -82,7 +79,7 @@ public class OneTimeAuthManagerTest {
|
|||
@Inject
|
||||
private Shiro shiro;
|
||||
|
||||
public OneTimeAuthManagerTest() {
|
||||
public OneTimeAuthManagerIT() {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -107,29 +104,7 @@ public class OneTimeAuthManagerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.OneTimeAuthManagerTest.war")
|
||||
.addPackage(org.libreccm.security.OneTimeAuthManager.class
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -214,9 +189,9 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
|
||||
assertThat(result, is(not(nullValue())));
|
||||
assertThat(result, is(not(empty())));
|
||||
|
|
@ -237,9 +212,9 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
mmuster, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
mmuster, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
|
||||
assertThat(result, is(empty()));
|
||||
}
|
||||
|
|
@ -284,11 +259,11 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
assertThat(
|
||||
oneTimeAuthManager.validTokenExistsForUser(
|
||||
user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION),
|
||||
is(true));
|
||||
});
|
||||
assertThat(
|
||||
oneTimeAuthManager.validTokenExistsForUser(
|
||||
user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION),
|
||||
is(true));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -300,11 +275,11 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
assertThat(
|
||||
oneTimeAuthManager.validTokenExistsForUser(
|
||||
user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION),
|
||||
is(false));
|
||||
});
|
||||
assertThat(
|
||||
oneTimeAuthManager.validTokenExistsForUser(
|
||||
user, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION),
|
||||
is(false));
|
||||
});
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
|
|
@ -346,15 +321,15 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
assertThat(result, is(not(empty())));
|
||||
shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
assertThat(oneTimeAuthManager.isValid(result.get(0)),
|
||||
is(true));
|
||||
});
|
||||
assertThat(oneTimeAuthManager.isValid(result.get(0)),
|
||||
is(true));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -366,9 +341,9 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
final List<OneTimeAuthToken> result = shiro.getSystemUser().execute(
|
||||
() -> {
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
|
||||
assertThat(result, is(not(empty())));
|
||||
final OneTimeAuthToken token = result.get(0);
|
||||
|
|
@ -379,8 +354,8 @@ public class OneTimeAuthManagerTest {
|
|||
|
||||
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(
|
||||
() -> {
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
return oneTimeAuthManager.retrieveForUser(
|
||||
jdoe, OneTimeAuthTokenPurpose.EMAIL_VERIFICATION);
|
||||
});
|
||||
|
||||
assertThat(result, is(not(empty())));
|
||||
shiro.getSystemUser().execute(
|
||||
|
|
@ -36,10 +36,8 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.EmailAddress;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import javax.inject.Inject;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -68,11 +65,14 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class PartyRepositoryTest {
|
||||
public class PartyRepositoryIT {
|
||||
|
||||
private static final String MMUSTER = "mmuster";
|
||||
|
||||
private static final String JDOE = "jdoe";
|
||||
|
||||
private static final String ADMINS = "admins";
|
||||
|
||||
private static final String MANAGERS = "managers";
|
||||
|
||||
@Inject
|
||||
|
|
@ -84,7 +84,7 @@ public class PartyRepositoryTest {
|
|||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
public PartyRepositoryTest() {
|
||||
public PartyRepositoryIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -108,29 +108,7 @@ public class PartyRepositoryTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.UserRepositoryTest.war")
|
||||
.addPackage(org.libreccm.security.User.class.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())
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -44,11 +44,9 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.CcmObject;
|
||||
import org.libreccm.core.CcmObjectRepository;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -74,7 +71,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class PermissionCheckerTest {
|
||||
public class PermissionCheckerIT {
|
||||
|
||||
@Inject
|
||||
private Subject subject;
|
||||
|
|
@ -88,7 +85,7 @@ public class PermissionCheckerTest {
|
|||
@Inject
|
||||
private CcmObjectRepository objectRepository;
|
||||
|
||||
public PermissionCheckerTest() {
|
||||
public PermissionCheckerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -112,27 +109,7 @@ public class PermissionCheckerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.PermissionCheckerTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.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())
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addClass(org.libreccm.imexport.Exportable.class)
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -36,11 +36,9 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.CcmObject;
|
||||
import org.libreccm.core.CcmObjectRepository;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.persistence.EntityManager;
|
||||
|
|
@ -55,6 +53,7 @@ import org.libreccm.categorization.CategorizationConstants;
|
|||
import org.libreccm.core.CoreConstants;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -72,7 +70,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class PermissionManagerTest {
|
||||
public class PermissionManagerIT {
|
||||
|
||||
@Inject
|
||||
private PermissionManager permissionManager;
|
||||
|
|
@ -89,7 +87,7 @@ public class PermissionManagerTest {
|
|||
@Inject
|
||||
private Shiro shiro;
|
||||
|
||||
public PermissionManagerTest() {
|
||||
public PermissionManagerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -112,29 +110,8 @@ public class PermissionManagerTest {
|
|||
public static WebArchive createDeployment() {
|
||||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.PermissionManagerTest.war").
|
||||
addPackage(org.libreccm.categorization.Categorization.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.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)
|
||||
"LibreCCM-org.libreccm.security.PermissionManagerTest.war")
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -36,9 +36,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -63,7 +60,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class RoleManagerTest {
|
||||
public class RoleManagerIT {
|
||||
|
||||
@Inject
|
||||
private RoleManager roleManager;
|
||||
|
|
@ -77,7 +74,7 @@ public class RoleManagerTest {
|
|||
@Inject
|
||||
private Shiro shiro;
|
||||
|
||||
public RoleManagerTest() {
|
||||
public RoleManagerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -101,27 +98,7 @@ public class RoleManagerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.RoleManagerTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.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.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())
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addClass(org.libreccm.imexport.Exportable.class)
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -204,7 +181,7 @@ public class RoleManagerTest {
|
|||
@UsingDataSet("datasets/org/libreccm/security/RoleManagerTest/data.yml")
|
||||
@ShouldMatchDataSet(
|
||||
value
|
||||
= "datasets/org/libreccm/security/RoleManagerTest/after-remove.yml",
|
||||
= "datasets/org/libreccm/security/RoleManagerTest/after-remove.yml",
|
||||
excludeColumns = {"membership_id"})
|
||||
@InSequence(300)
|
||||
public void removeRoleFromParty() {
|
||||
|
|
@ -36,9 +36,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -74,7 +71,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class RoleRepositoryTest {
|
||||
public class RoleRepositoryIT {
|
||||
|
||||
private static final String ADMINISTRATOR = "administrator";
|
||||
private static final String USER = "user";
|
||||
|
|
@ -89,7 +86,7 @@ public class RoleRepositoryTest {
|
|||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
public RoleRepositoryTest() {
|
||||
public RoleRepositoryIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -113,24 +110,7 @@ public class RoleRepositoryTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.RoleRepositoryTest.war")
|
||||
.addPackage(org.libreccm.security.User.class.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())
|
||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
|
||||
getPackage())
|
||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
||||
.getPackage())
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addClass(org.libreccm.imexport.Exportable.class)
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
|
|
@ -19,6 +19,8 @@
|
|||
package org.libreccm.security;
|
||||
|
||||
|
||||
import static org.libreccm.testutils.DependenciesHelpers.getModuleDependencies;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
|
|
@ -43,25 +45,24 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.CcmObject;
|
||||
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.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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -70,7 +71,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class SecuredCollectionTest {
|
||||
public class SecuredCollectionIT {
|
||||
|
||||
private static final String ACCESS_DENIED = "Access denied";
|
||||
|
||||
|
|
@ -87,7 +88,7 @@ public class SecuredCollectionTest {
|
|||
private SecuredCollection<CcmObject> collection2;
|
||||
private SecuredCollection<CcmObject> collection3;
|
||||
|
||||
public SecuredCollectionTest() {
|
||||
public SecuredCollectionIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -129,27 +130,7 @@ public class SecuredCollectionTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.SecuredCollectionTest.war")
|
||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package org.libreccm.security;
|
||||
|
||||
|
||||
import org.apache.shiro.authc.UsernamePasswordToken;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
||||
|
|
@ -37,11 +36,9 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.CcmObject;
|
||||
import org.libreccm.core.CcmObjectRepository;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -71,7 +67,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class SecuredIteratorTest {
|
||||
public class SecuredIteratorIT {
|
||||
|
||||
private static final String ACCESS_DENIED = "Access denied";
|
||||
|
||||
|
|
@ -86,10 +82,12 @@ public class SecuredIteratorTest {
|
|||
|
||||
//private List<CcmObject> list;
|
||||
private Iterator<CcmObject> iterator1;
|
||||
|
||||
private Iterator<CcmObject> iterator2;
|
||||
|
||||
private Iterator<CcmObject> iterator3;
|
||||
|
||||
public SecuredIteratorTest() {
|
||||
public SecuredIteratorIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -131,27 +129,7 @@ public class SecuredIteratorTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.SecuredIteratorTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -44,9 +44,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -69,12 +66,12 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class ShiroTest {
|
||||
public class ShiroIT {
|
||||
|
||||
@Inject
|
||||
private Subject subject;
|
||||
|
||||
public ShiroTest() {
|
||||
public ShiroIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -115,8 +112,6 @@ public class ShiroTest {
|
|||
.addClass(org.libreccm.modules.UnInstallEvent.class)
|
||||
.addClass(org.libreccm.modules.ShutdownEvent.class)
|
||||
.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())
|
||||
|
|
@ -24,8 +24,6 @@ import javax.inject.Inject;
|
|||
|
||||
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.ShouldThrowException;
|
||||
import org.jboss.arquillian.junit.Arquillian;
|
||||
|
|
@ -44,9 +42,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
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.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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -68,7 +67,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class UserManagerTest {
|
||||
public class UserManagerIT {
|
||||
|
||||
@Inject
|
||||
private UserManager userManager;
|
||||
|
|
@ -79,7 +78,7 @@ public class UserManagerTest {
|
|||
@Inject
|
||||
private Shiro shiro;
|
||||
|
||||
public UserManagerTest() {
|
||||
public UserManagerIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -103,29 +102,7 @@ public class UserManagerTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.UserManagerTest.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -20,8 +20,6 @@ package org.libreccm.security;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
||||
import org.jboss.arquillian.container.test.api.ShouldThrowException;
|
||||
import org.jboss.arquillian.junit.Arquillian;
|
||||
|
|
@ -44,10 +42,8 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
|
|||
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.libreccm.core.EmailAddress;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
|
@ -55,13 +51,18 @@ import java.util.Optional;
|
|||
import javax.inject.Inject;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
|
||||
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>
|
||||
*/
|
||||
@Category(IntegrationTest.class)
|
||||
@RunWith(Arquillian.class)
|
||||
@PersistenceTest
|
||||
@Transactional(TransactionMode.COMMIT)
|
||||
|
|
@ -70,11 +71,14 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
|||
"003_init_hibernate_sequence.sql"})
|
||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||
phase = TestExecutionPhase.BEFORE)
|
||||
public class UserRepositoryTest {
|
||||
public class UserRepositoryIT {
|
||||
|
||||
private static final String NOBODY = "nobody";
|
||||
|
||||
private static final String JOE = "joe";
|
||||
|
||||
private static final String MMUSTER = "mmuster";
|
||||
|
||||
private static final String JDOE = "jdoe";
|
||||
|
||||
@Inject
|
||||
|
|
@ -86,7 +90,7 @@ public class UserRepositoryTest {
|
|||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
public UserRepositoryTest() {
|
||||
public UserRepositoryIT() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
|
|
@ -110,27 +114,7 @@ public class UserRepositoryTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.security.UserRepositoryTest.war")
|
||||
.addPackage(org.libreccm.security.User.class.getPackage())
|
||||
.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)
|
||||
.addPackages(true, "com.arsdigita", "org.libreccm")
|
||||
.addAsLibraries(getModuleDependencies())
|
||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||
.addAsResource("test-persistence.xml",
|
||||
|
|
@ -20,7 +20,7 @@ package org.libreccm.security.authorization;
|
|||
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.libreccm.core.CcmObject;
|
||||
import org.libreccm.security.AuthorizationInterceptorTest;
|
||||
import org.libreccm.security.AuthorizationInterceptorIT;
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.libreccm.security.RequiresPrivilege;
|
||||
import org.libreccm.security.RequiresRole;
|
||||
|
|
@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.*;
|
|||
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>
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue