does anyone know why would this result to `undefin...
# announcements
h
does anyone know why would this result to
undefine
when I'm expecting it should be either
true
or
false
?
Copy code
obj shouldBe instanceOf(SomeClass::class)
k
As far as I can see, because
shouldBe
works like assertions, so it will throw an
AssertionError
.
shouldBe
is close to
assert obj instanceOf SomeClass
h
thanks
is
obj should beInstanceOf(SomeClass::class))
sufficient enough in this case?
I just want to check if obj is instance of SomeClass
k
Then you can simply write
obj is SomeClass
, not sure that external libs should be used in such case
h
yea maybe that makes more sense. its just im using KotlinTest Shoudlspec
so I thought I should use that external libs in this case