JPA Refactoring (4) (#2110)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-12-02 14:55:12 +02:00
committed by GitHub
parent a9f3d1491a
commit 6f80038619
18 changed files with 55 additions and 145 deletions

View File

@@ -1584,8 +1584,7 @@ class ControllerManagementTest extends AbstractJpaIntegrationTest {
@Test
@Description("Delete a target with a non existing thingId")
@ExpectEvents({
@Expect(type = TargetDeletedEvent.class, count = 0) })
@ExpectEvents({ @Expect(type = TargetDeletedEvent.class, count = 0) })
void deleteTargetWithInvalidThingId() {
assertThatExceptionOfType(EntityNotFoundException.class)
.as("No EntityNotFoundException thrown when deleting a non-existing target")

View File

@@ -134,7 +134,6 @@ public class DistributionSetTypeManagementTest extends AbstractJpaIntegrationTes
@Test
@Description("Verifies that the quota for software module types per distribution set type is enforced as expected.")
public void quotaMaxSoftwareModuleTypes() {
final int quota = quotaManagement.getMaxSoftwareModuleTypesPerDistributionSetType();
// create software module types
final List<Long> moduleTypeIds = new ArrayList<>();
@@ -168,8 +167,7 @@ public class DistributionSetTypeManagementTest extends AbstractJpaIntegrationTes
// assign as many optional modules as possible
final DistributionSetType dsType3 = distributionSetTypeManagement
.create(entityFactory.distributionSetType().create().key("dst3").name("dst3"));
distributionSetTypeManagement.assignOptionalSoftwareModuleTypes(dsType3.getId(),
moduleTypeIds.subList(0, quota));
distributionSetTypeManagement.assignOptionalSoftwareModuleTypes(dsType3.getId(), moduleTypeIds.subList(0, quota));
assertThat(distributionSetTypeManagement.get(dsType3.getId())).isNotEmpty();
assertThat(distributionSetTypeManagement.get(dsType3.getId()).get().getOptionalModuleTypes().size())
.isEqualTo(quota);

View File

@@ -491,7 +491,6 @@ public class SoftwareModuleManagementTest extends AbstractJpaIntegrationTest {
@Test
@Description("Checks that metadata for a software module can be created.")
public void createSoftwareModuleMetadata() {
final String knownKey1 = "myKnownKey1";
final String knownValue1 = "myKnownValue1";