Class TestUtilsKt
-
- All Implemented Interfaces:
public final class TestUtilsKt
-
-
Method Summary
Modifier and Type Method Description final static <N extends Any, V extends N> Unit
shouldEqual(KCallable<N> $self, V expected)
Extension to add the name of a property to error messages. final static Unit
shouldEqual(Chars $self, CharSequence charSeq)
final static <N extends Any, V extends N> Unit
shouldBe(KCallable<N> $self, V expected)
Extension to add the name of the property to error messages. final static <T extends Any> Unit
shouldMatch(KCallable<T> $self, Function1<T, Unit> expected)
final static <T extends Any> T
shouldBeA(Object $self, Function1<T, Unit> f)
final static <T extends Any> T
component6(List<T> $self)
final static <T extends Any> T
component7(List<T> $self)
final static <T extends Any> T
component8(List<T> $self)
final static <T extends Any> T
component9(List<T> $self)
final static <T extends Any> T
component10(List<T> $self)
final static <T extends Any> T
component11(List<T> $self)
final static List<RuleViolation>
assertSize(Report report, Integer size)
Assert number of violations. final static List<Report.SuppressedViolation>
assertSuppressed(Report report, Integer size)
Assert number of suppressed violations. final static Unit
assertPosition(Node $self, Integer bline, Integer bcol, Integer eline, Integer ecol)
Checks the coordinates of this node. -
-
Method Detail
-
shouldEqual
final static <N extends Any, V extends N> Unit shouldEqual(KCallable<N> $self, V expected)
Extension to add the name of a property to error messages.
-
shouldEqual
final static Unit shouldEqual(Chars $self, CharSequence charSeq)
-
shouldBe
final static <N extends Any, V extends N> Unit shouldBe(KCallable<N> $self, V expected)
Extension to add the name of the property to error messages. Use with double colon syntax, eg
it::isIntegerLiteral shouldBe true
. For properties synthesized from Java getters starting with "get", you have to use the name of the getter instead of that of the generated property (with the get prefix).If this conflicts with io.kotest.matchers.shouldBe, use the equivalent shouldEqual
-
shouldMatch
final static <T extends Any> Unit shouldMatch(KCallable<T> $self, Function1<T, Unit> expected)
-
component6
final static <T extends Any> T component6(List<T> $self)
-
component7
final static <T extends Any> T component7(List<T> $self)
-
component8
final static <T extends Any> T component8(List<T> $self)
-
component9
final static <T extends Any> T component9(List<T> $self)
-
component10
final static <T extends Any> T component10(List<T> $self)
-
component11
final static <T extends Any> T component11(List<T> $self)
-
assertSize
final static List<RuleViolation> assertSize(Report report, Integer size)
Assert number of violations.
-
assertSuppressed
final static List<Report.SuppressedViolation> assertSuppressed(Report report, Integer size)
Assert number of suppressed violations.
-
-
-
-