Title
m

mike_shysh

09/08/2017, 2:41 PM
Does anyone try to use assertJ with kotlin?
j

jk

09/08/2017, 2:42 PM
I do, it works well
t

todd.ginsberg

09/08/2017, 2:45 PM
Yes, I do, I like it.
m

mike_shysh

09/08/2017, 2:45 PM
hmm... I imported dependency, but still can't use 'assertThat'
j

jk

09/08/2017, 2:47 PM
are you using intelliJ?
v

Vlad

09/08/2017, 2:48 PM
@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

todd.ginsberg

09/08/2017, 2:50 PM
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

mike_shysh

09/08/2017, 2:51 PM
I use itelijidea
j

jk

09/08/2017, 2:52 PM
@mike_shysh did you refresh the gradle project after adding the dependency?
m

mike_shysh

09/08/2017, 2:58 PM
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

jk

09/08/2017, 3:01 PM
importing and using it is the same as what you would do in java
m

mike_shysh

09/08/2017, 3:05 PM
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)