Skip to content

Conversation

@kacmacuna
Copy link
Contributor


I confirm that I have read the Contributor Agreements v1.0, agree to be bound on them and confirm that my contribution is compliant.

@kacmacuna kacmacuna requested a review from robstoll as a code owner May 22, 2021 11:17
class MapEntryAssertionSamples {

@Test
fun isKeyValue() {
Copy link
Owner

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

Copy link
Owner

@robstoll robstoll May 26, 2021

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

@codecov
Copy link

codecov bot commented May 22, 2021

Codecov Report

Merging #911 (e90e491) into MapEntyAssertionSamples (c053551) will increase coverage by 0.14%.
The diff coverage is 100.00%.

❗ Current head e90e491 differs from pull request most recent head 4cc8765. Consider uploading reports for the commit 4cc8765 to get more accurate results
Impacted file tree graph

@@                     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              
Flag Coverage Δ
bbc 80.96% <20.00%> (-1.33%) ⬇️
bc 80.87% <20.00%> (-1.33%) ⬇️
current 88.02% <100.00%> (-1.26%) ⬇️
current_windows 87.07% <100.00%> (-1.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...eli/atrium/api/infix/en_GB/mapEntryExpectations.kt 100.00% <100.00%> (ø)
...nerated/kotlin/ch/tutteli/atrium/logic/mapEntry.kt 100.00% <100.00%> (ø)
...eli/atrium/logic/impl/DefaultMapEntryAssertions.kt 100.00% <100.00%> (ø)
...trium/api/infix/en_GB/chronoLocalDateAssertions.kt 100.00% <0.00%> (ø)
...rium/api/fluent/en_GB/chronoLocalDateAssertions.kt 100.00% <0.00%> (ø)
...m/api/infix/en_GB/chronoLocalDateTimeAssertions.kt 100.00% <0.00%> (ø)
...m/api/infix/en_GB/chronoZonedDateTimeAssertions.kt 100.00% <0.00%> (ø)
.../api/fluent/en_GB/chronoLocalDateTimeAssertions.kt 100.00% <0.00%> (ø)
.../api/fluent/en_GB/chronoZonedDateTimeAssertions.kt 100.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c053551...4cc8765. Read the comment docs.

@kacmacuna kacmacuna requested a review from robstoll May 24, 2021 12:18
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.MapEntryExpectationSamples.toEqualKeyValue
Copy link
Owner

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

Comment on lines 23 to 24
// subject here is of type Int (actually 1)
expect(mapOf(1 to "a").entries.first()).key toEqual 1
Copy link
Owner

@robstoll robstoll May 26, 2021

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):

Suggested change
// 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)

Suggested change
// 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() {
Copy link
Owner

@robstoll robstoll May 26, 2021

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

@kacmacuna kacmacuna requested a review from robstoll May 31, 2021 10:03
robstoll added 4 commits May 31, 2021 12:07
…/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
@robstoll robstoll changed the base branch from master to MapEntyAssertionSamples May 31, 2021 10:07
…/ch/tutteli/atrium/api/infix/en_GB/mapEntryAssertions.kt
@robstoll robstoll merged commit 37b8749 into robstoll:MapEntyAssertionSamples May 31, 2021
@robstoll
Copy link
Owner

@kacmacuna going to fix the last point myself. Thanks for your first contribution to Atrium 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants