Fix sonar findings: Type constants access (#1983)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-09 15:11:39 +02:00
committed by GitHub
parent 17fb7efe42
commit cc226eadac
12 changed files with 32 additions and 32 deletions

View File

@@ -214,7 +214,7 @@ class TargetTypeManagementTest extends AbstractJpaIntegrationTest {
.as("targetType with too long colour should not be created")
.isThrownBy(() -> targetTypeManagement.create(
entityFactory.targetType().create().name("a")
.colour(RandomStringUtils.randomAlphanumeric(TargetType.COLOUR_MAX_SIZE + 1))));
.colour(RandomStringUtils.randomAlphanumeric(Type.COLOUR_MAX_SIZE + 1))));
assertThatExceptionOfType(ConstraintViolationException.class)
.as("targetType with invalid colour should not be created").isThrownBy(() -> targetTypeManagement
@@ -224,7 +224,7 @@ class TargetTypeManagementTest extends AbstractJpaIntegrationTest {
.as("targetType with too long colour should not be updated")
.isThrownBy(() -> targetTypeManagement.update(
entityFactory.targetType().update(targetType.getId())
.colour(RandomStringUtils.randomAlphanumeric(TargetType.COLOUR_MAX_SIZE + 1))));
.colour(RandomStringUtils.randomAlphanumeric(Type.COLOUR_MAX_SIZE + 1))));
assertThatExceptionOfType(ConstraintViolationException.class)
.as("targetType with invalid colour should not be updated").isThrownBy(() -> targetTypeManagement