Skip to content

Commit

Permalink
More formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sufyanAbbasi committed Feb 29, 2024
1 parent b912038 commit a2d7af4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ import com.google.android.ground.ui.util.FileUtil
import com.google.android.ground.util.ByteCount
import com.google.android.ground.util.deleteIfEmpty
import com.google.android.ground.util.rangeOf
import java.io.File
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.map
import timber.log.Timber
import java.io.File
import javax.inject.Inject
import javax.inject.Singleton

/**
* Corners of the viewport are scaled by this value when determining the name of downloaded areas.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import androidx.lifecycle.viewModelScope
import com.google.android.ground.ui.common.AbstractViewModel
import com.google.android.ground.ui.common.Navigator
import com.google.android.ground.ui.common.SharedViewModel
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.launch
import javax.inject.Inject

@SharedViewModel
class HomeScreenViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,18 @@ import com.google.android.ground.ui.common.Navigator
import com.sharedtest.FakeData
import com.squareup.picasso.Picasso
import dagger.hilt.android.testing.HiltAndroidTest
import javax.inject.Inject
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.advanceUntilIdle
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.ParameterizedRobolectricTestRunner
import org.robolectric.RobolectricTestRunner
import javax.inject.Inject

abstract class AbstractHomeScreenFragmentTest : BaseHiltTest() {

@Inject
lateinit var localSurveyStore: LocalSurveyStore
@Inject lateinit var localSurveyStore: LocalSurveyStore
private lateinit var fragment: HomeScreenFragment
private var initializedPicasso = false

Expand Down Expand Up @@ -119,8 +118,7 @@ abstract class AbstractHomeScreenFragmentTest : BaseHiltTest() {
@RunWith(RobolectricTestRunner::class)
class HomeScreenFragmentTest : AbstractHomeScreenFragmentTest() {

@Inject
lateinit var surveyRepository: SurveyRepository
@Inject lateinit var surveyRepository: SurveyRepository

private val surveyWithoutBasemap: Survey =
Survey(
Expand All @@ -135,9 +133,9 @@ class HomeScreenFragmentTest : AbstractHomeScreenFragmentTest() {
private val surveyWithTileSources: Survey =
surveyWithoutBasemap.copy(
tileSources =
listOf(
TileSource("http://google.com", TileSource.Type.MOG_COLLECTION),
),
listOf(
TileSource("http://google.com", TileSource.Type.MOG_COLLECTION),
),
id = "SURVEY_WITH_TILE_SOURCES"
)

Expand All @@ -162,11 +160,9 @@ class NavigationDrawerItemClickTest(
private val testLabel: String
) : AbstractHomeScreenFragmentTest() {

@Inject
lateinit var navigator: Navigator
@Inject lateinit var navigator: Navigator

@Inject
lateinit var surveyRepository: SurveyRepository
@Inject lateinit var surveyRepository: SurveyRepository

@Test
fun clickDrawerMenuItem() = runWithTestDispatcher {
Expand Down

0 comments on commit a2d7af4

Please sign in to comment.