Skip to content

Commit

Permalink
Merge pull request #4480 from nscuro/issue-4478
Browse files Browse the repository at this point in the history
  • Loading branch information
nscuro authored Dec 19, 2024
2 parents 0e7ee36 + 332e0d4 commit ee5cbce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ public Component cloneComponent(Component sourceComponent, Project destinationPr
component.setCpe(sourceComponent.getCpe());
component.setPurl(sourceComponent.getPurl());
component.setPurlCoordinates(sourceComponent.getPurlCoordinates());
component.setSwidTagId(sourceComponent.getSwidTagId());
component.setInternal(sourceComponent.isInternal());
component.setDescription(sourceComponent.getDescription());
component.setCopyright(sourceComponent.getCopyright());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1907,6 +1907,7 @@ public void cloneProjectTest() {
componentA.setProject(project);
componentA.setName("acme-lib-a");
componentA.setVersion("2.0.0");
componentA.setSwidTagId("swidTagId");
componentA.setSupplier(componentSupplier);
qm.persist(componentA);

Expand Down Expand Up @@ -1976,7 +1977,8 @@ public void cloneProjectTest() {
"objectType": "COMPONENT",
"uuid": "${json-unit.matches:notSourceComponentUuid}",
"name": "acme-lib-a",
"version": "2.0.0"
"version": "2.0.0",
"swidTagId":"swidTagId"
}
]
""");
Expand Down Expand Up @@ -2006,6 +2008,7 @@ public void cloneProjectTest() {
assertThat(clonedComponent.getUuid()).isNotEqualTo(componentA.getUuid());
assertThat(clonedComponent.getName()).isEqualTo("acme-lib-a");
assertThat(clonedComponent.getVersion()).isEqualTo("2.0.0");
assertThat(clonedComponent.getSwidTagId()).isEqualTo("swidTagId");
assertThat(clonedComponent.getSupplier()).isNotNull();
assertThat(clonedComponent.getSupplier().getName()).isEqualTo("componentSupplier");
assertThatJson(clonedComponent.getDirectDependencies())
Expand Down

0 comments on commit ee5cbce

Please sign in to comment.