robstoll
07/20/2018, 11:10 AMassert
and hit code completion then I see two overloads from kotlin and then the overloads from Atrium (with subject
as parameter name). Yet, if you hit enter in this case then it makes a full qualified call instead of importing assert
. That's why I prefer the first way of importing Atrium's assertghedeon
07/20/2018, 11:10 AMisTrue()
is gone or maybe moved somewhere compared to 0.6.0
?robstoll
07/20/2018, 11:11 AMtoBe(true)
robstoll
07/20/2018, 11:11 AMrobstoll
07/20/2018, 11:13 AMtoBe(false)
, toBe(null)
I figured it is more idiomatic/consistent to use always the same function for equality checksghedeon
07/20/2018, 11:17 AMisTrue
in assertJ, but imho toBe(true)
is equally readable. So yeah.. the only think to consider is slightly pissed people that had isTrue
before)robstoll
07/20/2018, 11:18 AMrobstoll
07/20/2018, 11:18 AMrobstoll
07/20/2018, 11:19 AMghedeon
07/20/2018, 11:26 AMtoBe
function. Either you keep it lean and community will come up with atrium extension library that will contain verbs for every taste, or you collect some feedback for a while and do the changes with the highest number of votes.ghedeon
07/20/2018, 11:32 AMtoBe
, let the dust settle and chances are people will like it like this.robstoll
07/20/2018, 11:33 AMdave08
07/23/2018, 7:34 AMif (cxt2.expected == null)
assertThat(result).toBe(null)
else
assertThat(result).notToBeNullBut(cxt2.expected)
It tells me that cxt2.expected
is not a subtype of Any... it's nullable, but I have the null check no?dave08
07/23/2018, 7:35 AM!!
it works... but it's a bit ugly...dave08
07/23/2018, 7:37 AMval expected: SomeType? get() = ...
?dave08
07/23/2018, 7:39 AM!!
in this case.dave08
07/23/2018, 8:18 AMby lazy { }
and still have the problem... unless lazy also doesn't support smart casts..robstoll
07/23/2018, 10:45 AMvar
? If so then the problem is that the var could have changed since the null check and thus kotlin cannot apply s smart cast. Assign it to a local variable and it should workchristophsturm
07/24/2018, 5:08 PMEventually
?robstoll
07/24/2018, 5:16 PMrobstoll
07/24/2018, 5:19 PMrobstoll
07/24/2018, 5:21 PMchristophsturm
07/24/2018, 6:00 PMchristophsturm
07/24/2018, 6:01 PMrobfletcher
07/24/2018, 6:04 PMrobfletcher
07/24/2018, 6:05 PMchristophsturm
07/24/2018, 6:06 PMchristophsturm
07/24/2018, 6:06 PMchristophsturm
08/06/2018, 3:34 PMassert(names.any { it.canonicalName.contains("blah") }).toBe(true)
robstoll
08/06/2018, 4:54 PMassert(names).any {
property(subject::canonicalName).contains("foo")
}