CCM NG: Fixed failures in ContentSectionManagerTest
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@6003 8810af33-2d31-482b-a856-94f89814c4dfccm-docs
parent
b220ed7266
commit
5c25236994
|
|
@ -172,6 +172,7 @@ public class ContentSectionManagerTest {
|
|||
com.arsdigita.ui.admin.applications.DefaultApplicationSettingsPane.class)
|
||||
.addClass(org.libreccm.modules.Module.class)
|
||||
.addClass(org.libreccm.modules.RequiredModule.class)
|
||||
.addClass(org.libreccm.imexport.Exportable.class)
|
||||
.addPackage(org.librecms.dispatcher.ItemResolver.class.getPackage())
|
||||
.addPackage(com.arsdigita.util.Lockable.class.getPackage())
|
||||
.addPackage(com.arsdigita.web.BaseServlet.class.getPackage())
|
||||
|
|
@ -287,6 +288,7 @@ public class ContentSectionManagerTest {
|
|||
value = "datasets/org/librecms/contentsection/"
|
||||
+ "ContentSectionManagerTest/after-add-role.xml",
|
||||
excludeColumns = {"object_id",
|
||||
"uuid",
|
||||
"role_id",
|
||||
"permission_id",
|
||||
"creation_date",
|
||||
|
|
@ -454,12 +456,12 @@ public class ContentSectionManagerTest {
|
|||
"creation_date"})
|
||||
@InSequence(400)
|
||||
public void addContentTypeToSection() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13002L)
|
||||
.findById(13002L)
|
||||
.get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14001L)
|
||||
.findById(14001L)
|
||||
.get();
|
||||
|
||||
manager.addContentTypeToSection(Event.class,
|
||||
|
|
@ -481,12 +483,12 @@ public class ContentSectionManagerTest {
|
|||
+ "ContentSectionManagerTest/data.xml")
|
||||
@InSequence(500)
|
||||
public void addAlreadyAddedContentTypeToSection() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13002L)
|
||||
.findById(13002L)
|
||||
.get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14002L)
|
||||
.findById(14002L)
|
||||
.get();
|
||||
|
||||
manager.addContentTypeToSection(News.class,
|
||||
|
|
@ -509,11 +511,11 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(600)
|
||||
public void addContentTypeToSectionTypeIsNull() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13002L).get();
|
||||
.findById(13002L).get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14002L).get();
|
||||
.findById(14002L).get();
|
||||
|
||||
manager.addContentTypeToSection(null,
|
||||
section,
|
||||
|
|
@ -537,9 +539,9 @@ public class ContentSectionManagerTest {
|
|||
@InSequence(700)
|
||||
public void addContentTypeToSectionSectionIsNull() {
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13002L).get();
|
||||
.findById(13002L).get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14002L).get();
|
||||
.findById(14002L).get();
|
||||
|
||||
manager.addContentTypeToSection(Event.class,
|
||||
null,
|
||||
|
|
@ -561,9 +563,9 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(800)
|
||||
public void addContentTypeToSectionLifecycleIsNull() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14001L).get();
|
||||
.findById(14001L).get();
|
||||
|
||||
manager.addContentTypeToSection(Event.class,
|
||||
section,
|
||||
|
|
@ -585,9 +587,9 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(900)
|
||||
public void addContentTypeToSectionWorkflowIsNull() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13002L).get();
|
||||
.findById(13002L).get();
|
||||
|
||||
manager.addContentTypeToSection(Event.class,
|
||||
section,
|
||||
|
|
@ -610,11 +612,11 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(1000)
|
||||
public void addContentTypeToSectionLifecycleNotInSection() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13003L).get();
|
||||
.findById(13003L).get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14001L).get();
|
||||
.findById(14001L).get();
|
||||
|
||||
manager.addContentTypeToSection(Event.class,
|
||||
section,
|
||||
|
|
@ -636,11 +638,11 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(1100)
|
||||
public void addContentTypeToSectionWorkflowNoInSection() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
final LifecycleDefinition lifecycleDef = lifecycleDefRepo
|
||||
.findById(-13002L).get();
|
||||
.findById(13002L).get();
|
||||
final Workflow workflowTemplate = workflowRepo
|
||||
.findById(-14003L).get();
|
||||
.findById(14003L).get();
|
||||
|
||||
manager.addContentTypeToSection(Event.class,
|
||||
section,
|
||||
|
|
@ -657,7 +659,7 @@ public class ContentSectionManagerTest {
|
|||
+ "ContentSectionManagerTest/data.xml")
|
||||
@InSequence(1200)
|
||||
public void verifyHasContentType() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
|
||||
assertThat(manager.hasContentType(Article.class, section), is(true));
|
||||
assertThat(manager.hasContentType(News.class, section), is(true));
|
||||
|
|
@ -675,7 +677,7 @@ public class ContentSectionManagerTest {
|
|||
+ "ContentSectionManagerTest/after-remove-contenttype.xml")
|
||||
@InSequence(1300)
|
||||
public void removeContentTypeFromSection() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
|
||||
manager.removeContentTypeFromSection(News.class, section);
|
||||
}
|
||||
|
|
@ -694,7 +696,7 @@ public class ContentSectionManagerTest {
|
|||
+ "ContentSectionManagerTest/data.xml")
|
||||
@InSequence(1301)
|
||||
public void removeNotExistingContentTypeFromSection() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
|
||||
manager.removeContentTypeFromSection(Event.class, section);
|
||||
}
|
||||
|
|
@ -714,7 +716,7 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(1400)
|
||||
public void removeContentTypeFromSectionTypeInUse() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
|
||||
manager.removeContentTypeFromSection(Article.class, section);
|
||||
}
|
||||
|
|
@ -734,7 +736,7 @@ public class ContentSectionManagerTest {
|
|||
@ShouldThrowException(IllegalArgumentException.class)
|
||||
@InSequence(1400)
|
||||
public void removeContentTypeFromSectionTypeIsNull() {
|
||||
final ContentSection section = repository.findById(-1100L).get();
|
||||
final ContentSection section = repository.findById(1100L).get();
|
||||
|
||||
manager.removeContentTypeFromSection(null, section);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue