Make Action active field convertor JPA Vendor portable (#2132)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -65,9 +65,9 @@ public enum ActionFields implements RsqlQueryField, FieldValueConverter<ActionFi
|
|||||||
private static Object convertStatusValue(final String value) {
|
private static Object convertStatusValue(final String value) {
|
||||||
final String trimmedValue = value.trim();
|
final String trimmedValue = value.trim();
|
||||||
if (trimmedValue.equalsIgnoreCase(ACTIVE)) {
|
if (trimmedValue.equalsIgnoreCase(ACTIVE)) {
|
||||||
return 1;
|
return true;
|
||||||
} else if (trimmedValue.equalsIgnoreCase(INACTIVE)) {
|
} else if (trimmedValue.equalsIgnoreCase(INACTIVE)) {
|
||||||
return 0;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ class DistributionSetAccessControllerTest extends AbstractAccessControllerTest {
|
|||||||
assertThat(distributionSetManagement.findByTag(Pageable.unpaged(), dsTag.getId()).get().map(Identifiable::getId)
|
assertThat(distributionSetManagement.findByTag(Pageable.unpaged(), dsTag.getId()).get().map(Identifiable::getId)
|
||||||
.toList()).containsOnly(permitted.getId(), readOnly.getId());
|
.toList()).containsOnly(permitted.getId(), readOnly.getId());
|
||||||
|
|
||||||
assertThat(distributionSetManagement.findByRsqlAndTag(Pageable.unpaged(), "id==*", dsTag.getId()).get()
|
assertThat(distributionSetManagement.findByRsqlAndTag(Pageable.unpaged(), "name==*", dsTag.getId()).get()
|
||||||
.map(Identifiable::getId).toList()).containsOnly(permitted.getId(), readOnly.getId());
|
.map(Identifiable::getId).toList()).containsOnly(permitted.getId(), readOnly.getId());
|
||||||
|
|
||||||
// verify distributionSetManagement#unassignTag on permitted target
|
// verify distributionSetManagement#unassignTag on permitted target
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class TargetTypeAccessControllerTest extends AbstractAccessControllerTest {
|
|||||||
.containsOnly(permittedTargetType.getId());
|
.containsOnly(permittedTargetType.getId());
|
||||||
|
|
||||||
// verify targetTypeManagement#findByRsql
|
// verify targetTypeManagement#findByRsql
|
||||||
assertThat(targetTypeManagement.findByRsql(Pageable.unpaged(), "id==*").get().map(Identifiable::getId).toList())
|
assertThat(targetTypeManagement.findByRsql(Pageable.unpaged(), "name==*").get().map(Identifiable::getId).toList())
|
||||||
.containsOnly(permittedTargetType.getId());
|
.containsOnly(permittedTargetType.getId());
|
||||||
|
|
||||||
// verify targetTypeManagement#findByName
|
// verify targetTypeManagement#findByName
|
||||||
|
|||||||
Reference in New Issue
Block a user