FINERACT-2185: User management improvement
This commit is contained in:
committed by
Adam Saghy
parent
8d83b5547c
commit
79c006774e
+1
-1
@@ -101,7 +101,7 @@ public class CommandServiceStepDefinitions implements En {
|
||||
|
||||
public DummyCommand() {
|
||||
super(null, null, null, null, null, null, null, null, null, null, "{}", null, null, null, null, null, null,
|
||||
UUID.randomUUID().toString(), null);
|
||||
UUID.randomUUID().toString(), null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
@@ -29,6 +29,7 @@ import org.apache.fineract.commands.domain.CommandSource;
|
||||
import org.apache.fineract.commands.domain.CommandSourceRepository;
|
||||
import org.apache.fineract.commands.domain.CommandWrapper;
|
||||
import org.apache.fineract.infrastructure.codes.exception.CodeNotFoundException;
|
||||
import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant;
|
||||
import org.apache.fineract.infrastructure.core.exception.ErrorHandler;
|
||||
@@ -48,6 +49,9 @@ import org.mockito.MockitoAnnotations;
|
||||
@SuppressFBWarnings(value = "RV_EXCEPTION_NOT_THROWN", justification = "False positive")
|
||||
public class CommandSourceServiceTest {
|
||||
|
||||
@Mock
|
||||
private ConfigurationDomainService configurationDomainService;
|
||||
|
||||
@Mock
|
||||
private CommandSourceRepository commandSourceRepository;
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class IdempotencyKeyResolverTest {
|
||||
public void testIPKResolveFromWrapper() {
|
||||
String idk = "idk";
|
||||
CommandWrapper wrapper = new CommandWrapper(null, null, null, null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, idk, null);
|
||||
null, null, null, idk, null, null);
|
||||
String resolvedIdk = underTest.resolve(wrapper);
|
||||
Assertions.assertEquals(idk, resolvedIdk);
|
||||
}
|
||||
|
||||
+2
-3
@@ -117,7 +117,7 @@ public class SynchronousCommandProcessingServiceTest {
|
||||
when(commandSource.getStatus()).thenReturn(CommandProcessingResultType.PROCESSED.getValue());
|
||||
when(context.authenticatedUser(Mockito.any(CommandWrapper.class))).thenReturn(appUser);
|
||||
|
||||
when(commandSourceService.processCommand(commandHandler, jsonCommand, commandSource, appUser, false, false))
|
||||
when(commandSourceService.processCommand(commandHandler, jsonCommand, commandSource, appUser, false))
|
||||
.thenReturn(commandProcessingResult);
|
||||
|
||||
CommandProcessingResult actualCommandProcessingResult = underTest.executeCommand(commandWrapper, jsonCommand, false);
|
||||
@@ -163,8 +163,7 @@ public class SynchronousCommandProcessingServiceTest {
|
||||
|
||||
when(commandSourceService.findCommandSource(commandWrapper, idk)).thenReturn(initialCommandSource);
|
||||
|
||||
when(commandSourceService.processCommand(commandHandler, jsonCommand, commandSource, appUser, false, false))
|
||||
.thenThrow(runtimeException);
|
||||
when(commandSourceService.processCommand(commandHandler, jsonCommand, commandSource, appUser, false)).thenThrow(runtimeException);
|
||||
|
||||
assertThrows(RuntimeException.class, () -> {
|
||||
underTest.executeCommand(commandWrapper, jsonCommand, false);
|
||||
|
||||
Reference in New Issue
Block a user