add test
This commit is contained in:
parent
c34cf576e5
commit
85cc61934c
1 changed files with 19 additions and 0 deletions
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue