Skip to content
Snippets Groups Projects
Commit ec31a065 authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Properly prepare LoganSquare in test cases

parent 35fe099d
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -3,12 +3,9 @@ package com.commit451.gitlab
import android.app.Application
import android.content.Context
import android.content.res.Resources
import android.net.Uri
import android.support.annotation.VisibleForTesting
import android.support.multidex.MultiDex
import com.bluelinelabs.logansquare.LoganSquare
import com.commit451.gitlab.api.*
import com.commit451.gitlab.api.converter.UriTypeConverter
import com.commit451.gitlab.data.Prefs
import com.commit451.gitlab.model.Account
import com.commit451.gitlab.util.FabricUtil
Loading
Loading
@@ -57,11 +54,7 @@ open class App : Application() {
setupLeakCanary()
instance = this
 
/**
* Register our type converters on our singleton LoganSquare get. Needs to be set here
* since we are fetching accounts immediately with LoganSquare
*/
LoganSquare.registerTypeConverter(Uri::class.java, UriTypeConverter())
GitLab.init()
 
Prefs.init(this)
//So that we don't get weird half translations
Loading
Loading
package com.commit451.gitlab.api
 
import android.net.Uri
import com.bluelinelabs.logansquare.LoganSquare
import com.commit451.gitlab.api.converter.UriTypeConverter
/**
* Created by johncarlson on 1/30/17.
* Provides access to all the GitLab things
*/
object GitLab {
fun init() {
/**
* Register our type converters on our singleton LoganSquare get. Needs to be set here
* since we are fetching accounts immediately with LoganSquare
*/
LoganSquare.registerTypeConverter(Uri::class.java, UriTypeConverter())
}
}
\ No newline at end of file
package com.commit451.gitlab
 
import android.graphics.BitmapFactory
import com.commit451.gitlab.api.GitLab
import com.commit451.gitlab.api.GitLabService
import com.commit451.gitlab.model.api.Project
import com.commit451.gitlab.util.FileUtil
Loading
Loading
@@ -34,7 +35,7 @@ class ApiTests {
//for logging
ShadowLog.stream = System.out
 
//LoganSquare.registerTypeConverter(Uri::class.java, NullTypeConverter())
GitLab.init()
 
gitLab = TestUtil.login()
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment