-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix relationshipTest, add it to the solver, correct path in conversionTests #27
Conversation
…nTests Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
4e59068
to
ce505aa
Compare
fixes #26 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing CI 😃
for (var relationshipType : RelationshipType.values()) { | ||
if (relationshipType == RelationshipType.MISSING) { | ||
continue; | ||
} | ||
fileB.addRelationship( | ||
document.createRelationship( | ||
fileA, relationshipType, String.format("comment on %s", relationshipType.name()))); | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a side remark (no need to change this): This could be done quite elegantly with a stream, using one filter
to ignore the MISSING
type and then a forEach
static Checksum createSha1Checksum(IModelStore modelStore, String documentUri) throws InvalidSPDXAnalysisException { | ||
return Checksum.create(modelStore, documentUri, ChecksumAlgorithm.SHA1, "d6a770ba38583ed4bb4525bd96e50461655d2758"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it funny that we are always generating a hardcoded checksum value 😂 . But it's fine for the time being, as long as the actual value is irrelevant
@Builder.Default | ||
Map<String, Comparisons.Tuple<?>> differences = Collections.emptyMap(); | ||
ArrayNode differences = (new ObjectMapper()).createArrayNode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't create a new object mapper every time we need one. I created #28 to cover this, may require a little bit of thought
Signed-off-by: Armin Tänzer armin.taenzer@tngtech.com