Skip to content

Commit

Permalink
style: spotless applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Halulkin committed May 14, 2024
1 parent 478a61a commit 1c6cc27
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ class LoginScreenTest {
fun setUp() {
state = mutableStateOf(LoginState())
composeTestRule.setContent {
LoginScreen(state = state.value, actions = LoginActions(
onEmailChange = { state.value = state.value.copy(email = it) },
onPasswordChange = { state.value = state.value.copy(password = it) },
onLoginClick = { state.value = state.value.copy(isLoading = true) }
))
LoginScreen(
state = state.value,
actions = LoginActions(
onEmailChange = { state.value = state.value.copy(email = it) },
onPasswordChange = { state.value = state.value.copy(password = it) },
onLoginClick = { state.value = state.value.copy(isLoading = true) },
),
)
}
}

Expand Down Expand Up @@ -167,4 +170,4 @@ class LoginScreenTest {
.onNodeWithText("Invalid credentials")
.assertIsDisplayed()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import com.monstarlab.features.user.domain.repository.UserRepository
import io.mockk.clearAllMocks
import io.mockk.coEvery
import io.mockk.mockk
import kotlinx.coroutines.test.runTest
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import kotlinx.coroutines.test.runTest

class LoginUseCaseTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import com.monstarlab.features.login.domain.usecase.LoginUseCase
import io.mockk.clearAllMocks
import io.mockk.coEvery
import io.mockk.mockk
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
Expand All @@ -17,12 +23,6 @@ import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import kotlinx.coroutines.test.setMain
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test

class LoginViewModelTest {

Expand Down Expand Up @@ -84,7 +84,6 @@ class LoginViewModelTest {
assertEquals(testEmail, state.email)
}


/**
* GIVEN
* - initialPassword is "cityslicka"
Expand Down Expand Up @@ -253,5 +252,4 @@ class LoginViewModelTest {
assertEquals(LoginState(isLoading = false, isLoggedIn = true), awaitItem())
}
}

}
}

0 comments on commit 1c6cc27

Please sign in to comment.