Fix test stopRecordKeepsFile() but run it first... This is a workaround, the root cause is probably due to some missing cleanup.

This commit is contained in:
Benoit Marty 2022-09-21 16:02:13 +02:00
parent 7e32dc3054
commit 34c6d57c91

View File

@ -26,10 +26,13 @@ import org.amshove.kluent.shouldBeNull
import org.amshove.kluent.shouldExist
import org.amshove.kluent.shouldNotBeNull
import org.amshove.kluent.shouldNotExist
import org.junit.FixMethodOrder
import org.junit.Rule
import org.junit.Test
import org.junit.runners.MethodSorters
import java.io.File
@FixMethodOrder(MethodSorters.JVM)
class VoiceRecorderLTests {
@get:Rule
@ -48,8 +51,9 @@ class VoiceRecorderLTests {
stopRecord()
}
// Renamed to be run first... It fixes it.
@Test
fun stopRecordKeepsFile() = with(recorder) {
fun atFirstStopRecordKeepsFile() = with(recorder) {
getVoiceMessageFile().shouldBeNull()
startRecord("some_room_id")