diff --git a/ccm-cms/src/test/java/org/librecms/contentsection/ContentTypeRepositoryTest.java b/ccm-cms/src/test/java/org/librecms/contentsection/ContentTypeRepositoryTest.java index 98fddf340..63d301e02 100644 --- a/ccm-cms/src/test/java/org/librecms/contentsection/ContentTypeRepositoryTest.java +++ b/ccm-cms/src/test/java/org/librecms/contentsection/ContentTypeRepositoryTest.java @@ -334,6 +334,7 @@ public class ContentTypeRepositoryTest { .addClass(org.libreccm.core.Resource.class) .addClass(org.libreccm.core.ResourceType.class) .addClass(org.libreccm.core.UnexpectedErrorException.class) + .addClass(org.libreccm.imexport.Exportable.class) .addClass(org.libreccm.jpa.EntityManagerProducer.class) .addClass(org.libreccm.l10n.GlobalizationHelper.class) .addClass(org.libreccm.l10n.GlobalizedMessagesUtil.class) @@ -372,6 +373,7 @@ public class ContentTypeRepositoryTest { .addClass(org.libreccm.security.Permission.class) .addClass(org.libreccm.security.PermissionChecker.class) .addClass(org.libreccm.security.PermissionManager.class) + .addClass(org.libreccm.security.PermissionRepository.class) .addClass(org.libreccm.security.RecursivePermissions.class) .addClass(org.libreccm.security.RegistrationManager.class) .addClass(org.libreccm.security.Relation.class) @@ -454,7 +456,7 @@ public class ContentTypeRepositoryTest { @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentTypeRepositoryTest/data.xml") public void findByContentSection() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final List types = contentTypeRepo.findByContentSection( section); @@ -497,7 +499,7 @@ public class ContentTypeRepositoryTest { @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentTypeRepositoryTest/data.xml") public void findByContentSectionAndClass() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Optional articleType = contentTypeRepo .findByContentSectionAndClass(section, Article.class); final Optional newsType = contentTypeRepo @@ -548,7 +550,7 @@ public class ContentTypeRepositoryTest { + "ContentTypeRepositoryTest/data.xml") @ShouldThrowException(IllegalArgumentException.class) public void findByContentSectionAndClassNull() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Class type = null; contentTypeRepo.findByContentSectionAndClass(section, type); } @@ -563,7 +565,7 @@ public class ContentTypeRepositoryTest { @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentTypeRepositoryTest/data.xml") public void findByContentSectionAndClassName() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Optional articleType = contentTypeRepo .findByContentSectionAndClass(section, Article.class.getName()); final Optional newsType = contentTypeRepo @@ -616,7 +618,7 @@ public class ContentTypeRepositoryTest { + "ContentTypeRepositoryTest/data.xml") @ShouldThrowException(IllegalArgumentException.class) public void findByContentSectionAndClassNameNull() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final String type = null; contentTypeRepo.findByContentSectionAndClass(section, type); } @@ -630,7 +632,7 @@ public class ContentTypeRepositoryTest { @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentTypeRepositoryTest/data.xml") public void verifyIsContentTypeInUse() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Optional articleType = contentTypeRepo .findByContentSectionAndClass(section, Article.class); final Optional newsType = contentTypeRepo @@ -655,7 +657,7 @@ public class ContentTypeRepositoryTest { @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + "ContentTypeRepositoryTest/after-delete.xml") public void deleteUnusedContentType() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Optional newsType = contentTypeRepo .findByContentSectionAndClass(section, News.class); assertThat(newsType.isPresent(), is(true)); @@ -676,7 +678,7 @@ public class ContentTypeRepositoryTest { @ShouldThrowException(UnauthorizedException.class) public void deleteUnusedContentTypeUnauthorized() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Optional newsType = contentTypeRepo .findByContentSectionAndClass(section, News.class); assertThat(newsType.isPresent(), is(true)); @@ -696,7 +698,7 @@ public class ContentTypeRepositoryTest { + "ContentTypeRepositoryTest/data.xml") @ShouldThrowException(IllegalArgumentException.class) public void deleteContentTypeInUse() { - final ContentSection section = contentSectionRepo.findById(-1001L).get(); + final ContentSection section = contentSectionRepo.findById(1001L).get(); final Optional articleType = contentTypeRepo .findByContentSectionAndClass(section, Article.class); assertThat(articleType.isPresent(), is(true));