Does anyone try to use assertJ with kotlin?
# announcements
m
Does anyone try to use assertJ with kotlin?
j
I do, it works well
t
Yes, I do, I like it.
m
hmm... I imported dependency, but still can't use 'assertThat'
j
are you using intelliJ?
v
@todd.ginsberg @jk does it work well with nullable types? i.e. do you have to
!!
every time you are dealing with nullable value in assertion?
t
Not really. AssertJ is still java underneath and is expecting nullable objects in the
assertThat()
method. So tests like this fail, but I would expect them to:
val x: String? = null
assertThat(x).isBlank()
👍 1
m
I use itelijidea
j
@mike_shysh did you refresh the gradle project after adding the dependency?
m
yes, I see assertJ-core at the External libraries
may be I just using it wrong, I would appreciate any example or link to example?
j
importing and using it is the same as what you would do in java
m
tnx, I should have imported it directly typing
import org.assertj.core.api.Assertions.*
👍 1
I got used to do it automatically by intelijidea in java=)
strange things)