Update Deps + Cleanup (#1158)
* Fix Typo * Update build.gradle * Update Deps * Update Tests * Fixes Tests Without this some tests fail on my PC... + also: "Put this in your gradle.properties: android.enableUnitTestBinaryResources=true" from http://robolectric.org/migrating/#project-configuration * Make everything private * Fix Warning * Update TimelineFragment.java * Update build.gradle * Update gradle-wrapper.properties * Update gradle-wrapper.properties * Update gradle-wrapper.properties * Fix Compile Errors e.g. Type inference failed. Expected type mismatch: inferred type is Preference? but Preference was expected Type inference failed. Please try to specify type arguments explicitly. * fix crash * Grandle Wrapper 5.3 * Revert "Fix Compile Errors" This reverts commit 4a774a4fe3ce82c84bd7b4d78e1a1c64af97cd0d. * requirePreference * oops * Cleanup * Update gradle-wrapper.properties
This commit is contained in:
parent
bbf3286d8e
commit
0db1a23c4f
19 changed files with 99 additions and 61 deletions
|
@ -99,7 +99,7 @@ class BottomSheetActivityTest {
|
|||
}
|
||||
|
||||
@RunWith(Parameterized::class)
|
||||
class UrlMatchingTests(val url: String, val expectedResult: Boolean) {
|
||||
class UrlMatchingTests(private val url: String, private val expectedResult: Boolean) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "match_{0}")
|
||||
@JvmStatic
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.mockito.Mockito
|
|||
import org.mockito.Mockito.`when`
|
||||
import org.mockito.Mockito.mock
|
||||
import org.robolectric.Robolectric
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.fakes.RoboMenuItem
|
||||
import retrofit2.Call
|
||||
|
@ -51,15 +51,15 @@ import retrofit2.Response
|
|||
*/
|
||||
|
||||
@Config(application = FakeTuskyApplication::class)
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ComposeActivityTest {
|
||||
|
||||
lateinit var activity: ComposeActivity
|
||||
lateinit var accountManagerMock: AccountManager
|
||||
lateinit var apiMock: MastodonApi
|
||||
lateinit var themeUtilsMock: ThemeUtils
|
||||
private lateinit var activity: ComposeActivity
|
||||
private lateinit var accountManagerMock: AccountManager
|
||||
private lateinit var apiMock: MastodonApi
|
||||
private lateinit var themeUtilsMock: ThemeUtils
|
||||
|
||||
val account = AccountEntity(
|
||||
private val account = AccountEntity(
|
||||
id = 1,
|
||||
domain = "example.token",
|
||||
accessToken = "token",
|
||||
|
@ -259,7 +259,7 @@ class ComposeActivityTest {
|
|||
"Example instance for testing",
|
||||
"admin@example.token",
|
||||
"2.6.3",
|
||||
HashMap<String, String>(),
|
||||
HashMap(),
|
||||
null,
|
||||
null,
|
||||
listOf("en"),
|
||||
|
|
|
@ -6,7 +6,7 @@ package com.keylesspalace.tusky
|
|||
|
||||
class FakeTuskyApplication : TuskyApplication() {
|
||||
|
||||
lateinit var locator: ServiceLocator
|
||||
private lateinit var locator: ServiceLocator
|
||||
|
||||
override fun initSecurityProvider() {
|
||||
// No-op
|
||||
|
|
|
@ -105,7 +105,7 @@ class SpanUtilsTest {
|
|||
ArrayList<T>()
|
||||
} else {
|
||||
spans.filter { it.start >= start && it.end <= end && type.isAssignableFrom(it.span?.javaClass) }
|
||||
.map { it -> it.span }
|
||||
.map { it.span }
|
||||
.let { ArrayList(it) }
|
||||
}
|
||||
return matching.toArray() as Array<T>
|
||||
|
|
|
@ -39,23 +39,23 @@ class TimelineRepositoryTest {
|
|||
lateinit var mastodonApi: MastodonApi
|
||||
|
||||
@Mock
|
||||
lateinit var accountManager: AccountManager
|
||||
private lateinit var accountManager: AccountManager
|
||||
|
||||
lateinit var gson: Gson
|
||||
private lateinit var gson: Gson
|
||||
|
||||
lateinit var subject: TimelineRepository
|
||||
private lateinit var subject: TimelineRepository
|
||||
|
||||
lateinit var testScheduler: TestScheduler
|
||||
private lateinit var testScheduler: TestScheduler
|
||||
|
||||
|
||||
val limit = 30
|
||||
val account = AccountEntity(
|
||||
private val limit = 30
|
||||
private val account = AccountEntity(
|
||||
id = 2,
|
||||
accessToken = "token",
|
||||
domain = "domain.com",
|
||||
isActive = true
|
||||
)
|
||||
val htmlConverter = object : HtmlConverter {
|
||||
private val htmlConverter = object : HtmlConverter {
|
||||
override fun fromHtml(html: String): Spanned {
|
||||
return SpanUtilsTest.FakeSpannable(html)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue