-
Notifications
You must be signed in to change notification settings - Fork 318
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
OrtResultTest
improvements
#8555
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8555 +/- ##
=========================================
Coverage 67.68% 67.68%
Complexity 1006 1006
=========================================
Files 246 246
Lines 7924 7924
Branches 883 883
=========================================
Hits 5363 5363
Misses 2181 2181
Partials 380 380
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
with(openIssues.first()) { | ||
message shouldBe "Non-resolved issue" | ||
} | ||
openIssues.map { it.message }.shouldContainExactly("Non-resolved issue") |
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.
Nit: Closer to the original semantics would be shouldHaveSingleElement
(which also does not take a vararg
and thus has an infix
version).
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.
shouldHaveSingleElement "Non-resolved issue"
has the exact same semantics as .shouldContainExactly("Non-resolved issue")
, doesn't it?
Changing it anyway, as shouldHaveSingleElement
is a slight abbrevation.
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.
shouldHaveSingleElement "Non-resolved issue"
has the exact same semantics as.shouldContainExactly("Non-resolved issue")
, doesn't it?
shouldContainExactly
alone does not have the same semantics as shouldHaveSingleElement
, you also need to take the amount of parameters into account to match semantics. In other words, shouldHaveSingleElement
better expresses that you're never expecting there to be more than a single element.
Signed-off-by: Frank Viernau <[email protected]>
Re-align the name with the renamed functions. Signed-off-by: Frank Viernau <[email protected]>
Align with the tests for `getOpenIssues()`, so that AAA pattern remains visible. Signed-off-by: Frank Viernau <[email protected]>
Simplify the tests by testing one thing at a time. Signed-off-by: Frank Viernau <[email protected]>
0125ab8
to
0f202dd
Compare
Failing tests were unrelated. |
See individual commits.
Context: #7921.