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 arrayAssertions of api-infix #857

Merged
merged 2 commits into from Apr 4, 2021

Conversation

szatyinadam
Copy link
Collaborator

Add samples for arrayAssertions of api-infix.

Fix #675

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #857 (236450e) into master (11a08cf) will increase coverage by 3.94%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #857      +/-   ##
==========================================
+ Coverage   85.82%   89.77%   +3.94%     
==========================================
  Files         466      407      -59     
  Lines        4608     4040     -568     
  Branches      266      211      -55     
==========================================
- Hits         3955     3627     -328     
+ Misses        589      362     -227     
+ Partials       64       51      -13     
Flag Coverage Δ
bbc 84.05% <ø> (+5.39%) ⬆️
bc 83.49% <ø> (+5.25%) ⬆️
current 89.25% <ø> (+6.14%) ⬆️
current_windows 87.77% <ø> (+5.91%) ⬆️

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

Impacted Files Coverage Δ
.../tutteli/atrium/api/infix/en_GB/arrayAssertions.kt 100.00% <ø> (+5.26%) ⬆️
...in/ch/tutteli/atrium/core/polyfills/loadService.kt 0.00% <0.00%> (-100.00%) ⬇️
...teli/atrium/core/robstoll/CoreFactoryCommonImpl.kt
...reporting/impl/AssertionPairFormatterOptionImpl.kt
...builders/creating/PleaseUseReplacementException.kt
...atrium/domain/builders/reporting/ReporterOption.kt
...lin/ch/tutteli/atrium/reporting/ReporterFactory.kt
...core/robstoll/lib/reporting/OnlyFailureReporter.kt
...porting/impl/AssertionFormatterFacadeOptionImpl.kt
...eporting/TextExplanatoryAssertionGroupFormatter.kt
... and 55 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 11a08cf...236450e. Read the comment docs.

.asList {
it contains "C" // fails
it contains "D" // still evaluated even though `contains "C"` already fails
// use `.asList.` if you want a fail fast behaviour
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
// use `.asList.` if you want a fail fast behaviour
// use `asList o` if you want a fail fast behaviour

same same in other places

Comment on lines 67 to 70
} /* // subject here is back to type List<Int>
*/size { // subject inside this block is of type Int (actually 3)
it isLessThan 4
}
Copy link
Owner

Choose a reason for hiding this comment

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

In PairAssertionSamples you did the following which I think reads nicer

expect(listOf(1, 2, 3)) 
    .size { // subject inside this block is of type Int (actually 3)
        it isGreaterThan 1
    } // subject here is back to type List<Int>
    .size { // subject inside this block is of type Int (actually 3)
        it isLessThan 4
    }

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.

two details

@robstoll robstoll merged commit 97db672 into robstoll:master Apr 4, 2021
@robstoll
Copy link
Owner

robstoll commented Apr 4, 2021

@szatyinadam hat-trick 🎉
I have sent you an invitation to become a regular contributor. This way you can assign tasks to yourself. We look forward to further contributions 🙂

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 arrayAssertions of api-infix
2 participants