-
-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
manufacturer
from ProjectMetadata
to Project
As per CycloneDX specification, `metadata.manufacturer` refers to `metadata.component`, whereas `metadata.supplier` and `metadata.authors` refer to the BOM itself. Keeping `manufacturer` in `ProjectMetadata` is awkward and confusing. Signed-off-by: nscuro <[email protected]>
- Loading branch information
Showing
9 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,30 +137,31 @@ public void informTest() throws Exception { | |
assertThat(project.getLastBomImport()).isNotNull(); | ||
assertThat(project.getExternalReferences()).isNotNull(); | ||
assertThat(project.getExternalReferences()).hasSize(4); | ||
assertThat(project.getSupplier()).isNotNull(); | ||
assertThat(project.getSupplier().getName()).isEqualTo("Foo Incorporated"); | ||
assertThat(project.getSupplier().getUrls()).containsOnly("https://foo.bar.com"); | ||
assertThat(project.getSupplier().getContacts()).satisfiesExactly(contact -> { | ||
assertThat(contact.getName()).isEqualTo("Foo Jr."); | ||
assertThat(contact.getEmail()).isEqualTo("[email protected]"); | ||
assertThat(contact.getPhone()).isEqualTo("123-456-7890"); | ||
}); | ||
|
||
assertThat(project.getMetadata()).isNotNull(); | ||
assertThat(project.getMetadata().getAuthors()).satisfiesExactly(contact -> { | ||
assertThat(contact.getName()).isEqualTo("Author"); | ||
assertThat(contact.getEmail()).isEqualTo("[email protected]"); | ||
assertThat(contact.getPhone()).isEqualTo("123-456-7890"); | ||
}); | ||
assertThat(project.getMetadata().getManufacturer()).satisfies(supplier -> { | ||
assertThat(project.getSupplier()).satisfies(supplier -> { | ||
assertThat(supplier.getName()).isEqualTo("Foo Incorporated"); | ||
assertThat(supplier.getUrls()).containsOnly("https://foo.bar.com"); | ||
assertThat(supplier.getContacts()).satisfiesExactly(contact -> { | ||
assertThat(contact.getName()).isEqualTo("Foo Jr."); | ||
assertThat(contact.getEmail()).isEqualTo("[email protected]"); | ||
assertThat(contact.getPhone()).isEqualTo("123-456-7890"); | ||
}); | ||
}); | ||
assertThat(project.getManufacturer()).satisfies(manufacturer -> { | ||
assertThat(manufacturer.getName()).isEqualTo("Foo Incorporated"); | ||
assertThat(manufacturer.getUrls()).containsOnly("https://foo.bar.com"); | ||
assertThat(manufacturer.getContacts()).satisfiesExactly(contact -> { | ||
assertThat(contact.getName()).isEqualTo("Foo Sr."); | ||
assertThat(contact.getEmail()).isEqualTo("[email protected]"); | ||
assertThat(contact.getPhone()).isEqualTo("800-123-4567"); | ||
}); | ||
}); | ||
|
||
assertThat(project.getMetadata()).isNotNull(); | ||
assertThat(project.getMetadata().getAuthors()).satisfiesExactly(contact -> { | ||
assertThat(contact.getName()).isEqualTo("Author"); | ||
assertThat(contact.getEmail()).isEqualTo("[email protected]"); | ||
assertThat(contact.getPhone()).isEqualTo("123-456-7890"); | ||
}); | ||
assertThat(project.getMetadata().getSupplier()).satisfies(manufacturer -> { | ||
assertThat(manufacturer.getName()).isEqualTo("Foo Incorporated"); | ||
assertThat(manufacturer.getUrls()).containsOnly("https://foo.bar.com"); | ||
|