You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform (all, jvm, js): all Extension (none, kotlin 1.3): none
Code related feature
Say you have used assertJ in your project and would like to migrate to Atrium. To allow that one can migrate step by step to Atrium it would be nice if someone could write:
And then in reporting we would see something along the lines of (imagine we would show all expectations):
I expected subject: Person(..., children=...)
* -> age: 56
to be greater than: 40
* to have: grandsons
!! expectation failed, thrown exception:
ℹ Properties of the unexpected org.opentest4j.AssertionFailedError
» message: "expected: 2
but was: 1" <1234789>
» stacktrace:
⚬ org.atriumlib.ToHoldThirdPartyExpecationTest$1$7$1.invoke(ToHoldThirdPartyExpecationTest.kt:67)
⚬ org.atriumlib.ToHoldThirdPartyExpecationTest$1$7$1.invoke(ToHoldThirdPartyExpecationTest.kt:22)
⚬ org.atriumlib.ToHoldThirdPartyExpecationTest$1$7.invoke(ToHoldThirdPartyExpecationTest.kt:280)
⚬ org.atriumlib.ToHoldThirdPartyExpecationTest$1$7.invoke(ToHoldThirdPartyExpecationTest.kt:22)
One can currently achieve more or less the same using subject-changer but it requires already quite a bit of knowledge of _logic-level API
expect(person) {
_logic.changeSubject.reportBuilder()
.withDescriptionAndRepresentation(
"to have",
"grandsons",
).withTransformation {
Some { 1 }
}
.withDefaultFailureHandler()
.build()
.transformAndAppend {
notToThrow()
// dummy expectation, we need one as not defining one would throw as well
// but this shows up in case of an error which isn't nice at all
.toBeAnInstanceOf<Any>()
}
}
And it would show up differently in reporting
The text was updated successfully, but these errors were encountered:
Platform (all, jvm, js): all
Extension (none, kotlin 1.3): none
Code related feature
Say you have used assertJ in your project and would like to migrate to Atrium. To allow that one can migrate step by step to Atrium it would be nice if someone could write:
And then in reporting we would see something along the lines of (imagine we would show all expectations):
One can currently achieve more or less the same using subject-changer but it requires already quite a bit of knowledge of _logic-level API
And it would show up differently in reporting
The text was updated successfully, but these errors were encountered: