Skip to content

Commit

Permalink
Add list check to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lovef committed Dec 3, 2017
1 parent 0397c06 commit be60339
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ null.isNull()

true.isTrue();
{ null.isTrue() } throws Error::class

listOf(1, "2") passes listCheck(
{ it isEqualTo 1 },
{ it isEqualTo "2" })
```

## Setup

``` gradle
dependencies {
...
testCompile 'se.lovef:kotlin-assert-utils:0.1.1'
testCompile 'se.lovef:kotlin-assert-utils:0.2.0'
}
repositories {
Expand Down
3 changes: 2 additions & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

testCompile 'se.lovef:kotlin-assert-utils:0.1.1'
testCompile 'se.lovef:kotlin-assert-utils:0.2.1'
}

repositories {
mavenCentral()
jcenter()
}
4 changes: 4 additions & 0 deletions example/src/test/kotlin/se/lovef/example/ExampleTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@ class ExampleTest {

true.isTrue();
{ null.isTrue() } throws Error::class

listOf(1, "2") passes listCheck(
{ it isEqualTo 1 },
{ it isEqualTo "2" })
}
}

0 comments on commit be60339

Please sign in to comment.