This commit is contained in:
Johannes Mockenhaupt 2019-04-10 14:49:23 +02:00
parent c34cf576e5
commit 85cc61934c
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -0,0 +1,19 @@
package info.nightscout.androidaps.plugins.general.versionChecker
import org.junit.Assert.assertEquals
import org.junit.Test
class VersionCheckerUtilsKtTest {
@Test
fun findVersionMatches() {
val buildGradle = """blabla
| android {
| aosenuthoae
| }
| version = "2.2.2"
| appName = "Aaoeu"
""".trimMargin()
val detectedVersion: String? = buildGradle.byteInputStream().findVersion()
assertEquals("2.2.2", detectedVersion)
}
}