-
-
Notifications
You must be signed in to change notification settings - Fork 230
add MapEntyAssertionSamples in infix package #911
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
add MapEntyAssertionSamples in infix package #911
Conversation
...infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/mapEntryExpectations.kt
Outdated
Show resolved
Hide resolved
...test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/deprecated/MapEntryAssertionSamples.kt
Outdated
Show resolved
Hide resolved
| class MapEntryAssertionSamples { | ||
|
|
||
| @Test | ||
| fun isKeyValue() { |
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.
you forgot to add the @sample in the KDoc in mapEntryExpectations.kt
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 adding this documentation in addition (next to MapExpectationSamples). You need to add the @sample tag to the functions in mapEntryAssertions.kt (as you need to do it for mapEntryExpectations.kt) if you want that the users of Atrium actually see it in the docs
...test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/deprecated/MapEntryAssertionSamples.kt
Outdated
Show resolved
Hide resolved
...test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/deprecated/MapEntryAssertionSamples.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## MapEntyAssertionSamples #911 +/- ##
===========================================================
+ Coverage 91.01% 91.16% +0.14%
===========================================================
Files 420 426 +6
Lines 4141 4209 +68
Branches 210 210
===========================================================
+ Hits 3769 3837 +68
Misses 323 323
Partials 49 49
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| * | ||
| * @return an [Expect] for the subject of `this` expectation. | ||
| * | ||
| * @sample ch.tutteli.atrium.api.infix.en_GB.samples.MapEntryExpectationSamples.toEqualKeyValue |
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.
same same for other methods, also add the @sample tag to the key and value overloads. You can check if it works by holding ALT + clicking with your middle mouse on the method name
| // subject here is of type Int (actually 1) | ||
| expect(mapOf(1 to "a").entries.first()).key toEqual 1 |
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.
IMO this is misleading as one does not know if you mean the initial subject map(1 to "a") or the one after key. I suggest you re-format it to the following (also in other places):
| // subject here is of type Int (actually 1) | |
| expect(mapOf(1 to "a").entries.first()).key toEqual 1 | |
| expect(mapOf(1 to "a").entries.first()).key toEqual 1 | |
| // | subject is now of type Int (actually 1) |
And to make it even more obvious, could also add an extra line (up to you which one you prefer)
| // subject here is of type Int (actually 1) | |
| expect(mapOf(1 to "a").entries.first()).key toEqual 1 | |
| expect(mapOf(1 to "a").entries.first()).key toEqual 1 | |
| // | | subject is now of type Int (actually 1) | |
| // | subject is of type Map<Int, String> |
| class MapEntryAssertionSamples { | ||
|
|
||
| @Test | ||
| fun isKeyValue() { |
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 adding this documentation in addition (next to MapExpectationSamples). You need to add the @sample tag to the functions in mapEntryAssertions.kt (as you need to do it for mapEntryExpectations.kt) if you want that the users of Atrium actually see it in the docs
...i-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
Outdated
Show resolved
Hide resolved
...i-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
Outdated
Show resolved
Hide resolved
...i-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
Outdated
Show resolved
Hide resolved
...i-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
Outdated
Show resolved
Hide resolved
...infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/mapEntryExpectations.kt
Outdated
Show resolved
Hide resolved
…/ch/tutteli/atrium/api/infix/en_GB/mapEntryExpectations.kt
…/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
…/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
…/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
…/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
|
@kacmacuna going to fix the last point myself. Thanks for your first contribution to Atrium 👍 |
I confirm that I have read the Contributor Agreements v1.0, agree to be bound on them and confirm that my contribution is compliant.