Skip to content

Commit

Permalink
test(model): Make use of an EMPTY constant in a couple of places
Browse files Browse the repository at this point in the history
Make the code more compact.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Apr 25, 2024
1 parent 69bdfd9 commit 0577f85
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions model/src/test/kotlin/OrtResultTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ class OrtResultTest : WordSpec({
"omit resolved issues" {
val ortResult = OrtResult.EMPTY.copy(
analyzer = AnalyzerRun.EMPTY.copy(
result = AnalyzerResult(
projects = emptySet(),
packages = emptySet(),
result = AnalyzerResult.EMPTY.copy(
issues = mapOf(
Identifier("Maven:org.oss-review-toolkit:example:1.0") to listOf(
Issue(message = "Issue message to resolve", source = ""),
Expand Down Expand Up @@ -187,9 +185,7 @@ class OrtResultTest : WordSpec({
"omit issues with violation below threshold" {
val ortResult = OrtResult.EMPTY.copy(
analyzer = AnalyzerRun.EMPTY.copy(
result = AnalyzerResult(
projects = emptySet(),
packages = emptySet(),
result = AnalyzerResult.EMPTY.copy(
issues = mapOf(
Identifier("Maven:org.oss-review-toolkit:example:1.0") to
listOf(
Expand Down Expand Up @@ -229,15 +225,14 @@ class OrtResultTest : WordSpec({
)
),
analyzer = AnalyzerRun.EMPTY.copy(
result = AnalyzerResult(
result = AnalyzerResult.EMPTY.copy(
projects = setOf(
Project.EMPTY.copy(
id = Identifier("Maven:org.oss-review-toolkit:excluded:1.0"),
definitionFilePath = "excluded/pom.xml",
declaredLicenses = emptySet()
)
),
packages = emptySet(),
issues = mapOf(
Identifier("Maven:org.oss-review-toolkit:excluded:1.0") to
listOf(Issue(message = "Excluded issue", source = "")),
Expand Down

0 comments on commit 0577f85

Please sign in to comment.