[#1509] Sync Target type with SW and DS types (#1512)

Unifies Target type with the other types
* _TargetType_ made to inhert type, thus
* _TargetType_ now has immutable _key_
* add _AbstractJpaTypeEntity_ abstraction that implement the common 'type' JPA functionallity

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2023-12-12 15:24:57 +02:00
committed by GitHub
parent 4289f464c5
commit 71a5319019
12 changed files with 157 additions and 119 deletions

View File

@@ -74,14 +74,14 @@ public class SoftwareModuleTypeManagementTest extends AbstractJpaIntegrationTest
@Test
@Description("Calling update for changed fields results in change in the repository.")
public void updateSoftareModuleTypeFieldsToNewValue() {
public void updateSoftwareModuleTypeFieldsToNewValue() {
final SoftwareModuleType created = softwareModuleTypeManagement
.create(entityFactory.softwareModuleType().create().key("test-key").name("test-name"));
final SoftwareModuleType updated = softwareModuleTypeManagement.update(
entityFactory.softwareModuleType().update(created.getId()).description("changed").colour("changed"));
assertThat(updated.getOptLockRevision()).as("Expected version number of updated entitity is")
assertThat(updated.getOptLockRevision()).as("Expected version number of updated entities is")
.isEqualTo(created.getOptLockRevision() + 1);
assertThat(updated.getDescription()).as("Updated description is").isEqualTo("changed");
assertThat(updated.getColour()).as("Updated vendor is").isEqualTo("changed");