thanh
09/29/2019, 2:06 PMEarthCitizen
10/06/2019, 4:46 PMLeoColman
10/09/2019, 8:48 PMHexa
10/19/2019, 10:56 AMzceejkr
10/19/2019, 12:03 PMwasyl
10/20/2019, 11:28 AMLeoColman
11/02/2019, 7:59 PMYeah, I'll give it a try anyways 👌Feel free to ask us if you have any doubts 🙂
wasyl
11/07/2019, 12:06 PMlateinit
keyword, while setting stuff from closures will often make it necessarySergio Crespo Toubes
11/08/2019, 8:58 AMfun loadData = MainScope().launch {
view.showProgressDialog()
// load data
}
Given(""){
When(""){
runBlocking {
withContext(Dispatchers.Main) {
presenter.loadData()
}
}
Then("show progress dialog") {
verify(exactly = 1) {
view.showProgressDialog()
}
}
}
}
I am loading coroutines with this way
val mainThreadSurrogate = newSingleThreadContext("Main thread")
override fun isolationMode(): IsolationMode = IsolationMode.InstancePerLeaf
override fun beforeSpec(spec: Spec) {
super.beforeSpec(spec)
Dispatchers.setMain(mainThreadSurrogate)
}
override fun afterSpec(spec: Spec) {
super.afterSpec(spec)
mainThreadSurrogate.close()
}
acando86
11/09/2019, 12:30 PMsavrov
11/09/2019, 4:40 PMjulian
11/09/2019, 11:43 PMio.kotlintest.data
are forall
instead of forAll
like the capitalization pattern applied in the rest of the library? It took 5 minutes for me to realize that the compiler was giving problems because I was using, and importing, the wrong for-all.sam
11/12/2019, 11:28 PM""" { "name" : "sam" }""".shouldMatchJson(" { "name": \n\n: "sam" \n\n }"""
BorzdeG
11/14/2019, 6:48 PMforall
with suspend functions?wasyl
11/14/2019, 7:06 PMcom.example.TestClass > com.example.TestClass > executionError FAILED
org.mockito.exceptions.base.MockitoException at TestClass.kt:168
null
java.lang.NullPointerException
at org.gradle.api.internal.tasks.testing.results.StateTrackingTestResultProcessor.started(StateTrackingTestResultProcessor.java:45)
at org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor.started(AttachParentTestResultProcessor.java:38)
followed by a bunch of
Received a failure event for test with unknown id '4.74'. Registered test ids: '[4.70, 4.64, 4.1, :data:graphql-networking:test]'
java.lang.IllegalArgumentException: Received a failure event for test with unknown id '4.74'. Registered test ids: '[4.70, 4.64, 4.1, :data:graphql-networking:test]'
at org.gradle.api.internal.tasks.testing.results.StateTrackingTestResultProcessor.failure(StateTrackingTestResultProcessor.java:103)
at org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor.failure(AttachParentTestResultProcessor.java:43)
?Ian Thomas
11/15/2019, 11:03 AMdata.sql
file in my test resources folder, but I’d prefer to have fixtures per test, ideally using the @Sql
annotation. However, this annotation doesn’t seem to be usable with the kotlintest spec style and applying it to a beforeTest
method also doesn’t seem to work. Has anyone got any experience working with this sort of thing or any tips for a better way to work with test data? Thanks!bbaldino
11/16/2019, 12:15 AMbbaldino
11/18/2019, 6:59 PMdr.dreigh
11/20/2019, 9:54 AMGen.string()
I'm looking for something like Gen.string().withNulls()
or similarThomás Horta
11/26/2019, 4:05 AMLeoColman
11/26/2019, 5:08 PMGen.lines(file).take(1000)
would be very easy to use (and to implement)Terje Andersen
11/27/2019, 7:54 AMHexa
11/28/2019, 8:14 PMhenrik
12/02/2019, 12:25 PMRun MyTest
for kotlintests in buildSrc? It works in the regular source tree, and the tests are run if I run gradle test
on the command line.bbaldino
12/02/2019, 9:12 PMAbstractShouldSpec.ShouldScope
in order to make tests a bit cleaner? or is that the idea?sam
12/08/2019, 2:35 AMa shouldMatchJson "foo"
Animesh Sahu
12/08/2019, 2:38 PMclass MyTest: StringSpec({
val destroyable = Destroyable()
// attach afterSpec listener
// override fun afterSpec() = destroyable.destroy()
})
Quinn
12/11/2019, 5:02 PMLuke Rohde
12/17/2019, 10:27 PMsam
01/03/2020, 7:53 AM