-
-
Notifications
You must be signed in to change notification settings - Fork 211
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 Expect.because to document the reason for an assertion #660
Comments
@robstoll I'll take this one, if it's ok |
Valefant
pushed a commit
to Valefant/atrium
that referenced
this issue
Oct 24, 2020
…toll#660-add-except-because
Valefant
pushed a commit
to Valefant/atrium
that referenced
this issue
Oct 27, 2020
…toll#660-add-except-because � Conflicts: � apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/AnyAssertionSamples.kt
Valefant
pushed a commit
to Valefant/atrium
that referenced
this issue
Oct 28, 2020
…toll#660-add-except-because
robstoll
pushed a commit
that referenced
this issue
Dec 21, 2020
* add because method for documenting the reason for the following assertion/s Co-authored-by: Valefant <valentino.bernardo_ciddio@smail.th-koeln.de> The format in this commit is not yet correct
robstoll
pushed a commit
that referenced
this issue
Dec 21, 2020
* add because method for documenting the reason for the following assertion/s Co-authored-by: Valefant <valentino.bernardo_ciddio@smail.th-koeln.de> The format in this commit is not yet correct
robstoll
pushed a commit
that referenced
this issue
Dec 21, 2020
* add because method for documenting the reason for the following assertion/s Co-authored-by: Valefant <valentino.bernardo_ciddio@smail.th-koeln.de> The format in this commit is not yet correct
robstoll
pushed a commit
that referenced
this issue
Dec 23, 2020
* add because method for documenting the reason for the following assertion/s Co-authored-by: Valefant <valentino.bernardo_ciddio@smail.th-koeln.de> The format in this commit is not yet correct
robstoll
added a commit
that referenced
this issue
Dec 23, 2020
Merged
This was referenced Dec 24, 2020
Closed
Closed
Closed
This was referenced Dec 24, 2020
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Platform (all, jvm, js, android): all
Extension (none, kotlin 1.3): none
Code related feature
See robstoll/atrium-roadmap#15 for the full background.
We want to be able to state the reason for an assertion (could also be additional context to explain the assertion etc.).
And it should look like the following in reporting:
Following the things you need to do:
core
core-robstoll-lib
informationBulletPoint
to TextExplanatoryAssertionGroupFormatter, use "ℹ ", and adjust formatGroupHeaderAndGetChildParameterObject accordinglyspecs
(i)
as ascii bullet pointlogic
because
which takes a string and an assertionCreator-lambda (see other assertion functions in anyAssertions which take an assertionCreator-lambda)because
in DefaultAnyAssertions.kt by using the assertionBuilder and create an invisibleAssertionGroup where it consists of two assertions, first the collected assertions and second an ExplanatoryAssertionGroup with your new type containing only an ExplanatoryAssertion with the corresponding text, prefixed with"because "
where because should be translated (use "weil " for german) -> i.e. u need to use a TranslatableWithArgs (search for existing code)./gradlew generateLogic
this will re-generate any.kt under src/generatedapi-fluent
because
in anyAssertions.kt and delegate to logic (see other functions in anyAssertion)@since 0.14.0
(adapt to current milestone) to KDOCbecause
to AnyAssertionsSpec in specs-common and check that it works as expected:api-infix
use "because not yet implemented in this API" to Companion:because
and create in the companion object a method named because which delegates to logicBonus:
expect(...) because of("? is not allowed in file names on Windows") { ... }
index
to see how you can achieve an infixbecause of
-> introduceOfWithCreator
Your first contribution?
I'll work on this
if you would like to take this issue over.This way we get the chance to revise the description in case things have changed in the meantime, we might give you additional hints and we can assign the task to you, so that others do not start as well.
(Invite yourself in case you do not have an account yet).
The text was updated successfully, but these errors were encountered: