Fixed test failures

ccm-docs
Jens Pelzetter 2020-12-23 14:46:19 +01:00
parent efb5800f4c
commit e025bd6108
6 changed files with 33 additions and 25 deletions

View File

@ -53,7 +53,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Tests for the {@link AttachmentListManager}.
@ -120,6 +120,7 @@ public class AttachmentListManagerIT {
.addAsResource("test-persistence.xml",
"META-INF/persistence.xml")
.addAsWebInfResource("test-web.xml", "web.xml")
.addAsResource(EmptyAsset.INSTANCE, "META-INF/beans.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
}

View File

@ -52,7 +52,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Verifies the methods of the {@link ContentItemL10NManager}.
@ -122,6 +122,7 @@ public class ContentItemL10NManagerIT {
.addAsResource("test-persistence.xml",
"META-INF/persistence.xml")
.addAsWebInfResource("test-web.xml", "web.xml")
.addAsResource(EmptyAsset.INSTANCE, "META-INF/beans.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
}

View File

@ -52,7 +52,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
/**
@ -113,6 +113,7 @@ public class FolderManagerIT {
"META-INF/persistence.xml")
.addAsResource("configs/shiro.ini", "shiro.ini")
.addAsWebInfResource("test-web.xml", "web.xml")
.addAsResource(EmptyAsset.INSTANCE, "META-INF/beans.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
}

View File

@ -51,8 +51,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Tests for the {@link ItemAttachmentManager}.
@ -118,7 +117,7 @@ public class ItemAttachmentManagerIT {
return ShrinkWrap
.create(WebArchive.class,
"LibreCCM-org.librecms.assets.AssetManagerTest.war")
.addPackages(true, "com.arsdigita", "org.libreccm", "org.librecms")
.addPackages(true, "com.arsdigita", "org.libreccm", "org.librecms")
.addAsLibraries(getCcmCoreDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini")
.addAsResource(
@ -127,6 +126,7 @@ public class ItemAttachmentManagerIT {
.addAsResource("test-persistence.xml",
"META-INF/persistence.xml")
.addAsWebInfResource("test-web.xml", "web.xml")
.addAsResource(EmptyAsset.INSTANCE, "META-INF/beans.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
}

View File

@ -51,8 +51,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.libreccm.security.Shiro;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
/**
*
@ -112,13 +114,16 @@ public class ShortcutManagerIT {
.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.configuration.Configuration.class.getPackage()
)
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class
.getPackage())
.addPackage(
org.libreccm.jpa.EntityManagerProducer.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())

View File

@ -19,7 +19,6 @@
package org.libreccm.shortcuts;
import static org.libreccm.testutils.DependenciesHelpers.getCcmCoreDependencies;
import static org.libreccm.testutils.DependenciesHelpers.getModuleDependencies;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
@ -52,7 +51,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
/**
*
@ -107,22 +106,23 @@ public class ShortcutRepositoryIT {
"LibreCCM-org.libreccm.shortcuts.ShortcutRepositoryTest-web.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.categorization.Categorization.class.getPackage()
)
.addPackage(
org.libreccm.configuration.Configuration.class.getPackage()
)
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class
.getPackage())
.addPackage(
org.libreccm.jpa.EntityManagerProducer.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())
.addClass(org.libreccm.imexport.Exportable.class)
.addClass(org.libreccm.shortcuts.Shortcut.class)
.addClass(org.libreccm.shortcuts.ShortcutRepository.class)
.addAsLibraries(getModuleDependencies())
.addAsLibraries(getCcmCoreDependencies())
.addAsResource(
"test-persistence.xml", "META-INF/persistence.xml"