Skip to content
Snippets Groups Projects
Commit 81be647e authored by srosse's avatar srosse
Browse files

OO-2046: fix unit tests

parent 079057d1
No related branches found
No related tags found
No related merge requests found
...@@ -280,7 +280,7 @@ public interface BaseSecurity { ...@@ -280,7 +280,7 @@ public interface BaseSecurity {
/** /**
* @param username the username * @param username the username
* @param user the unpresisted User * @param user The persisted user (mandatory)
* @param provider the provider of the authentication ("OLAT" or "AAI"). If * @param provider the provider of the authentication ("OLAT" or "AAI"). If
* null, no authentication token is generated. * null, no authentication token is generated.
* @param authusername the username used as authentication credential * @param authusername the username used as authentication credential
......
...@@ -683,7 +683,7 @@ public class BaseSecurityManager implements BaseSecurity { ...@@ -683,7 +683,7 @@ public class BaseSecurityManager implements BaseSecurity {
/** /**
* @param username the username * @param username the username
* @param user the presisted User * @param user The persisted user (mandatory)
* @param authusername the username used as authentication credential * @param authusername the username used as authentication credential
* (=username for provider "OLAT") * (=username for provider "OLAT")
* @param provider the provider of the authentication ("OLAT" or "AAI"). If null, no * @param provider the provider of the authentication ("OLAT" or "AAI"). If null, no
......
...@@ -35,7 +35,6 @@ import static org.junit.Assert.fail; ...@@ -35,7 +35,6 @@ import static org.junit.Assert.fail;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
...@@ -54,6 +53,7 @@ import org.olat.core.util.coordinate.LockEntry; ...@@ -54,6 +53,7 @@ import org.olat.core.util.coordinate.LockEntry;
import org.olat.core.util.coordinate.LockResult; import org.olat.core.util.coordinate.LockResult;
import org.olat.core.util.coordinate.Locker; import org.olat.core.util.coordinate.Locker;
import org.olat.core.util.resource.OresHelper; import org.olat.core.util.resource.OresHelper;
import org.olat.test.JunitTestHelper;
import org.olat.test.OlatTestCase; import org.olat.test.OlatTestCase;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -95,7 +95,7 @@ public class LockTest extends OlatTestCase { ...@@ -95,7 +95,7 @@ public class LockTest extends OlatTestCase {
// some setup // some setup
List<Identity> identities = new ArrayList<Identity>(); List<Identity> identities = new ArrayList<Identity>();
for (int i = 0; i < MAX_COUNT + MAX_USERS_MORE; i++) { for (int i = 0; i < MAX_COUNT + MAX_USERS_MORE; i++) {
Identity i1 = securityManager.createAndPersistIdentity("lock-" + UUID.randomUUID().toString(), null, null, null, null); Identity i1 = JunitTestHelper.createAndPersistIdentityAsRndUser("lock-");
identities.add(i1); identities.add(i1);
} }
dbInstance.closeSession(); dbInstance.closeSession();
...@@ -176,7 +176,7 @@ public class LockTest extends OlatTestCase { ...@@ -176,7 +176,7 @@ public class LockTest extends OlatTestCase {
@Test @Test
public void testSaveEvent() { public void testSaveEvent() {
Identity identity = securityManager.createAndPersistIdentity("lock-save-event-" + UUID.randomUUID().toString(), null, null, null, null); Identity identity = JunitTestHelper.createAndPersistIdentityAsRndUser("lock-save-event-");
dbInstance.closeSession(); dbInstance.closeSession();
log.info("Created identity=" + identity); log.info("Created identity=" + identity);
......
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