mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-24 05:36:07 -06:00
Merge branch 'release/0.21.2' into master
This commit is contained in:
commit
c362ad12c7
@ -14,7 +14,7 @@ cache:
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
- 0.21.1
|
||||
- 0.21.2
|
||||
|
||||
android:
|
||||
licenses:
|
||||
|
@ -18,8 +18,8 @@ android {
|
||||
testApplicationId "io.github.tests.wulkanowy"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 29
|
||||
versionCode 71
|
||||
versionName "0.21.1"
|
||||
versionCode 72
|
||||
versionName "0.21.2"
|
||||
multiDexEnabled true
|
||||
resValue "string", "app_name", "Wulkanowy"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@ -127,7 +127,7 @@ configurations.all {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.github.wulkanowy:sdk:0.21.1"
|
||||
implementation "io.github.wulkanowy:sdk:0.21.2"
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
|
||||
|
||||
|
@ -56,11 +56,11 @@ object PairAdapterFactory : JsonAdapter.Factory {
|
||||
private fun deserializeGsonPair(reader: JsonReader): List<Pair<String, String>>? {
|
||||
val list = listAdapter.fromJson(reader) ?: return null
|
||||
|
||||
require(list.size == 2 || list.isEmpty()) {
|
||||
"pair with more or less than two elements: $list"
|
||||
}
|
||||
|
||||
return list.map {
|
||||
require(it.size == 2) {
|
||||
"pair with more or less than two elements: $list"
|
||||
}
|
||||
|
||||
it["first"].orEmpty() to it["second"].orEmpty()
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
Wersja 0.21.1
|
||||
Wersja 0.21.2
|
||||
- naprawiliśmy logowanie do tarnowskiego dziennika
|
||||
- naprawiliśmy wyświetlanie podsumowania punktów klasy
|
||||
- dodaliśmy skróty aplikacji
|
||||
|
@ -7,19 +7,24 @@ class ConvertersTest {
|
||||
|
||||
@Test
|
||||
fun stringPairListToJson() {
|
||||
assertEquals(Converters().stringPairListToJson(listOf("aaa" to "bbb", "ccc" to "ddd", "eee" to "fff")), "[{\"first\":\"aaa\",\"second\":\"bbb\"},{\"first\":\"ccc\",\"second\":\"ddd\"},{\"first\":\"eee\",\"second\":\"fff\"}]")
|
||||
assertEquals(Converters().stringPairListToJson(listOf("aaa" to "bbb", "ccc" to "ddd")), "[{\"first\":\"aaa\",\"second\":\"bbb\"},{\"first\":\"ccc\",\"second\":\"ddd\"}]")
|
||||
assertEquals(Converters().stringPairListToJson(listOf("aaa" to "bbb")), "[{\"first\":\"aaa\",\"second\":\"bbb\"}]")
|
||||
assertEquals(Converters().stringPairListToJson(listOf()), "[]")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun jsonToStringPairList() {
|
||||
assertEquals(Converters().jsonToStringPairList("[{\"first\":\"aaa\",\"second\":\"bbb\"},{\"first\":\"ccc\",\"second\":\"ddd\"},{\"first\":\"eee\",\"second\":\"fff\"}]"), listOf("aaa" to "bbb", "ccc" to "ddd", "eee" to "fff"))
|
||||
assertEquals(Converters().jsonToStringPairList("[{\"first\":\"aaa\",\"second\":\"bbb\"},{\"first\":\"ccc\",\"second\":\"ddd\"}]"), listOf("aaa" to "bbb", "ccc" to "ddd"))
|
||||
assertEquals(Converters().jsonToStringPairList("[{\"first\":\"aaa\",\"second\":\"bbb\"}]"), listOf("aaa" to "bbb"))
|
||||
assertEquals(Converters().jsonToStringPairList("[]"), listOf<Pair<String, String>>())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun jsonToStringPairList_0210() {
|
||||
assertEquals(Converters().jsonToStringPairList("{\"aaa\":\"bbb\",\"ccc\":\"ddd\"}"), listOf("aaa" to "bbb", "ccc" to "ddd"))
|
||||
assertEquals(Converters().jsonToStringPairList("{\"aaa\":\"bbb\"}"), listOf("aaa" to "bbb"))
|
||||
assertEquals(Converters().jsonToStringPairList("{}"), listOf<Pair<String, String>>())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user