Skip to content
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 samples for collectionAssertions of api-infix #847

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

szatyinadam
Copy link
Collaborator

Add samples for collectionAssertions of api-infix.

Fix #680 .

@szatyinadam szatyinadam marked this pull request as draft March 27, 2021 16:28
@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #847 (46e42d9) into master (485495e) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #847      +/-   ##
==========================================
+ Coverage   85.80%   85.82%   +0.02%     
==========================================
  Files         466      466              
  Lines        4606     4606              
  Branches      266      266              
==========================================
+ Hits         3952     3953       +1     
+ Misses        590      589       -1     
  Partials       64       64              
Flag Coverage Δ
bbc 74.44% <ø> (ø)
bc 77.02% <ø> (ø)
current 83.10% <ø> (+0.02%) ⬆️
current_windows 81.84% <ø> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...eli/atrium/api/infix/en_GB/collectionAssertions.kt 100.00% <ø> (+20.00%) ⬆️

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 485495e...46e42d9. Read the comment docs.

@szatyinadam szatyinadam marked this pull request as ready for review March 27, 2021 21:08
Copy link
Owner

@robstoll robstoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szatyinadam thanks for your work, a few improvements and we are good to merge

@robstoll
Copy link
Owner

@szatyinadam I just remembered that we used another syntax in ListAssertionSamples for the comments which is superior to my suggestion. Please take a look and adjust your samples accordingly.

robstoll
robstoll previously approved these changes Mar 29, 2021
Copy link
Owner

@robstoll robstoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, many thanks 👍
Going to wait for the build to pass.

@szatyinadam
Copy link
Collaborator Author

sizeFeature() fails, because it seems it is using an assertion group block, and the containsNot message still presents. Can You help me about how to use size in a fail fast assertion style?

@robstoll
Copy link
Owner

robstoll commented Mar 29, 2021

I see, that's a bummer, we currently don't allow fail fast within an assertion group block. What we can see here is a weakness of the infix-API, we have not defined size as infix function. Maybe we should improve here.... anyway, go with the following for now:

        expect(listOf(1, 2, 3))
            .size isLessThan 1 isGreaterThan 4
            //|       |              | not reported because `isLessThan 1` already fails
            //|       | fails
            //| subject is now of type Int (actually 3)

robstoll
robstoll previously approved these changes Mar 29, 2021
@robstoll
Copy link
Owner

robstoll commented Mar 29, 2021

@szatyinadam hm... the remaining failure is due to my suggestion to inline #847 (comment) I am sorry, looks like my memory of the infix API wasn't that good. Up to you if you want to change this again, I can also do it myself (will most likely do it tomorrow unless you have done it by then)

@robstoll robstoll merged commit d5ad2b5 into robstoll:master Mar 30, 2021
@robstoll
Copy link
Owner

@szatyinadam thanks for your first contribution to Atrium 🙂 👍

We could use your help with other issues and don't forget to ⭐ Atrium if you liked it.

@szatyinadam
Copy link
Collaborator Author

@robstoll Thanks for your patience, and I will definitely look for other issues 🙂

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.

add samples for collectionAssertions of api-infix
2 participants