use of com.sequenceiq.freeipa.service.freeipa.user.AcceptResult in project cloudbreak by hortonworks.
the class BindUserCreateOperationAcceptorTest method testDifferentEnvSameSuffixIsAccepted.
@Test
public void testDifferentEnvSameSuffixIsAccepted() {
Operation runningOperation = createCurrentOperation();
runningOperation.setId(0L);
runningOperation.setOperationId("other");
runningOperation.setEnvironmentList(List.of("otherEnv"));
Operation currentOperation = createCurrentOperation();
when(repository.findRunningByAccountIdAndType(ACCOUNT, underTest.selector())).thenReturn(List.of(runningOperation, currentOperation));
AcceptResult result = underTest.accept(currentOperation);
assertTrue(result.isAccepted());
assertTrue(result.getRejectionMessage().isEmpty());
}
Aggregations