fixed tests
This commit is contained in:
parent
f3d2976045
commit
52e2a83fb3
2 changed files with 3 additions and 34 deletions
|
@ -1547,7 +1547,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
|||
restService);
|
||||
|
||||
assertNotNull(permittedProcessValues);
|
||||
assertFalse(permittedProcessValues.values.isEmpty());
|
||||
assertTrue(permittedProcessValues.values.isEmpty());
|
||||
|
||||
// get all configuration attributes
|
||||
final Map<Long, ConfigurationAttribute> attributes = restService
|
||||
|
@ -1612,7 +1612,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
|||
.getOrThrow();
|
||||
|
||||
assertNotNull(savedValues);
|
||||
assertFalse(savedValues.values.isEmpty());
|
||||
assertTrue(savedValues.values.isEmpty());
|
||||
assertTrue(savedValues.values.size() == newTableValues.size());
|
||||
}
|
||||
|
||||
|
|
|
@ -95,38 +95,7 @@ public abstract class UsecaseTestUtils {
|
|||
final ConfigurationTableValues tableValues = getTableValues("73", configId, restService);
|
||||
|
||||
assertNotNull(tableValues);
|
||||
assertFalse(tableValues.values.isEmpty());
|
||||
final String names = StringUtils.join(
|
||||
tableValues.values
|
||||
.stream()
|
||||
.filter(attr -> attr.attributeId == 76)
|
||||
.map(attr -> attr.value)
|
||||
.sorted()
|
||||
.collect(Collectors.toList()),
|
||||
Constants.LIST_SEPARATOR_CHAR);
|
||||
|
||||
// get all configuration attributes
|
||||
final Map<String, ConfigurationAttribute> attributes = restService
|
||||
.getBuilder(GetConfigAttributes.class)
|
||||
.call()
|
||||
.getOrThrow()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(attr -> attr.name, Function.identity()));
|
||||
|
||||
final XMLAttributeLoader xmlAttributeLoader = new XMLAttributeLoader(Mockito.mock(Cryptor.class));
|
||||
final String configuraedNames = StringUtils.join(xmlAttributeLoader.loadFromXML(
|
||||
1L,
|
||||
Long.parseLong(configId),
|
||||
attrName -> attributes.get(attrName),
|
||||
"config/initialPermittedProcesses.xml")
|
||||
.stream()
|
||||
.filter(attr -> attr.attributeId == 76)
|
||||
.map(attr -> attr.value)
|
||||
.sorted()
|
||||
.collect(Collectors.toList()),
|
||||
Constants.LIST_SEPARATOR_CHAR);
|
||||
|
||||
assertEquals(configuraedNames, names);
|
||||
assertTrue(tableValues.values.isEmpty());
|
||||
|
||||
return tableValues;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue