Skip to content
Snippets Groups Projects
Commit 1f1e9187 authored by User expired's avatar User expired
Browse files

OPENOLAT-425: fixed junit tests failing because of our more relaxed search...

OPENOLAT-425: fixed junit tests failing because of our more relaxed search options / and managed flags initialization
parent 5d1ae554
No related branches found
No related tags found
No related merge requests found
......@@ -144,13 +144,13 @@ public class RepositoryServiceImpl implements RepositoryService {
@Override
public RepositoryEntry create(String initialAuthor, String resourceName,
String displayname, String description, OLATResource resource) {
return create(initialAuthor, null, resourceName, displayname, description, resource, 0, "");
return create(initialAuthor, null, resourceName, displayname, description, resource, 0, null);
}
@Override
public RepositoryEntry create(Identity initialAuthor, String initialAuthorAlt,
String resourceName, String displayname, String description, OLATResource resource, int access) {
return create(initialAuthorAlt, initialAuthor, resourceName, displayname, description, resource, access, "");
return create(initialAuthorAlt, initialAuthor, resourceName, displayname, description, resource, access, null);
}
@Override
......
......@@ -1209,3 +1209,24 @@ video.transcoding.resolution.preferred=720
video.transcoding.dir=${folder.root}/transcodedVideos
video.transcoding.dir.values=${folder.root}/transcodedVideos, /mount/cheap/disk/transcodedVideos
########################################
# Options for course wizard
########################################
# <OLATBPS-522>
course.wizard.publishing.enabled=true
course.wizard.sismanager.scheme=http
course.wizard.sismanager.host=localhost
course.wizard.sismanager.port=8181
course.wizard.sismanager.contextPath=/cxf/vle-connect
# </OLATBPS-522>
# Comma separated list of terms to show in the wizard
course.wizard.sismanager.visibleTerms=2016W,2016S
# The default term to show, 0 means the first in the list
course.wizard.sismanager.defaultTerm=2016W
course.wizard.managedflags.autonomous=delete,copy
course.wizard.managedflags.fullysynced=details,close,delete,bookings,copy
course.wizard.managedflags.syncednoregistration=details,close,delete,copy
......@@ -48,8 +48,8 @@ import org.olat.group.model.BusinessGroupMembershipViewImpl;
import org.olat.group.model.BusinessGroupQueryParams;
import org.olat.group.model.BusinessGroupRow;
import org.olat.group.model.OpenBusinessGroupRow;
import org.olat.group.model.StatisticsBusinessGroupRow;
import org.olat.group.model.SearchBusinessGroupParams;
import org.olat.group.model.StatisticsBusinessGroupRow;
import org.olat.repository.RepositoryEntry;
import org.olat.repository.manager.RepositoryEntryRelationDAO;
import org.olat.resource.OLATResource;
......@@ -454,17 +454,17 @@ public class BusinessGroupDAOTest extends OlatTestCase {
params.setName(marker);
List<BusinessGroup> groups = businessGroupDao.findBusinessGroups(params, null, 0, -1);
Assert.assertNotNull(groups);
Assert.assertEquals(2, groups.size() );
Assert.assertEquals(3, groups.size());
Assert.assertTrue(groups.contains(group1));
Assert.assertTrue(groups.contains(group2));
Assert.assertFalse(groups.contains(group3));
Assert.assertTrue(groups.contains(group3));
//check the same with the views
BusinessGroupQueryParams searchParams = new BusinessGroupQueryParams();
searchParams.setName(marker);
List<BusinessGroupRow> groupViews = businessGroupDao.searchBusinessGroupsWithMemberships(searchParams, identity);
Assert.assertNotNull(groupViews);
Assert.assertEquals(2, groupViews.size() );
Assert.assertEquals(2, groupViews.size());
Assert.assertTrue(contains(groupViews, group1));
Assert.assertTrue(contains(groupViews, group2));
Assert.assertFalse(contains(groupViews, group3));
......@@ -513,10 +513,10 @@ public class BusinessGroupDAOTest extends OlatTestCase {
params.setDescription(marker);
List<BusinessGroup> groups = businessGroupDao.findBusinessGroups(params, null, 0, -1);
Assert.assertNotNull(groups);
Assert.assertEquals(1, groups.size() );
Assert.assertEquals(3, groups.size());
Assert.assertTrue(groups.contains(group1));
Assert.assertFalse(groups.contains(group2));
Assert.assertFalse(groups.contains(group3));
Assert.assertTrue(groups.contains(group2));
Assert.assertTrue(groups.contains(group3));
//check find business group
......@@ -524,7 +524,7 @@ public class BusinessGroupDAOTest extends OlatTestCase {
searchParams.setDescription(marker);
List<BusinessGroupRow> groupViews = businessGroupDao.searchBusinessGroupsWithMemberships(searchParams, identity);
Assert.assertNotNull(groupViews);
Assert.assertEquals(1, groupViews.size() );
Assert.assertEquals(1, groupViews.size());
Assert.assertTrue(contains(groupViews, group1));
Assert.assertFalse(contains(groupViews, group2));
Assert.assertFalse(contains(groupViews, group3));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment