diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 598a849..53b14d5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -145,6 +145,7 @@ dependencies { androidTestImplementation(Testing.composeTestRunner) androidTestImplementation(Testing.composeTestUiManifest) implementation(Testing.composeJunit4) + androidTestImplementation(Testing.hiltTest) kaptAndroidTest(Testing.hiltTestCompiler) diff --git a/buildSrc/build/classes/kotlin/main/Versions.class b/buildSrc/build/classes/kotlin/main/Versions.class index 6130d8e..8bd5899 100644 Binary files a/buildSrc/build/classes/kotlin/main/Versions.class and b/buildSrc/build/classes/kotlin/main/Versions.class differ diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 16e47c8..f36889a 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -271,7 +271,7 @@ object Versions { const val composeTestRunner = "1.4.0" const val composeTestUi = "1.5.4" - const val hiltTest = "2.37" + const val hiltTest = "2.45" const val orbit = "6.1.0" diff --git a/chart/src/test/java/com/uliga/chart/ExampleUnitTest.kt b/chart/src/test/java/com/uliga/chart/ExampleUnitTest.kt deleted file mode 100644 index fed82ad..0000000 --- a/chart/src/test/java/com/uliga/chart/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.uliga.chart - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file diff --git a/data-local/src/test/java/com/uliga/data_local/ExampleUnitTest.kt b/data-local/src/test/java/com/uliga/data_local/ExampleUnitTest.kt deleted file mode 100644 index 6c7ed49..0000000 --- a/data-local/src/test/java/com/uliga/data_local/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.uliga.data_local - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file diff --git a/data-remote/src/test/java/com/uliga/data_remote/ExampleUnitTest.kt b/data-remote/src/test/java/com/uliga/data_remote/ExampleUnitTest.kt deleted file mode 100644 index 528dba2..0000000 --- a/data-remote/src/test/java/com/uliga/data_remote/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.uliga.data_remote - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file diff --git a/data/src/test/java/com/uliga/data/ExampleUnitTest.kt b/data/src/test/java/com/uliga/data/ExampleUnitTest.kt deleted file mode 100644 index e37f219..0000000 --- a/data/src/test/java/com/uliga/data/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.uliga.data - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file diff --git a/domain/src/test/java/com/uliga/domain/fakeRepository/FakeAccountBookRepository.kt b/domain/src/test/java/com/uliga/domain/fakeRepository/FakeAccountBookRepository.kt index 68d8963..ffaa7a6 100644 --- a/domain/src/test/java/com/uliga/domain/fakeRepository/FakeAccountBookRepository.kt +++ b/domain/src/test/java/com/uliga/domain/fakeRepository/FakeAccountBookRepository.kt @@ -20,12 +20,15 @@ import com.uliga.domain.model.accountBook.transaction.AccountBookTransactionIds import com.uliga.domain.model.accountBook.transaction.AccountBookTransactionRequest import com.uliga.domain.model.accountBook.transaction.AccountBookTransactionResponse import com.uliga.domain.repository.AccountBookRepository +import kotlinx.coroutines.flow.Flow class FakeAccountBookRepository : AccountBookRepository { - private lateinit var accountBookName: String + lateinit var fakeAccountBookName: String - private var accountBookId: Long = 0L + private var fakeAccountBookId: Long = 0L + override val accountBookAsset: Flow + get() = TODO("Not yet implemented") override suspend fun getAccountBooks(): Result { TODO("Not yet implemented") @@ -48,6 +51,7 @@ class FakeAccountBookRepository : AccountBookRepository { } override suspend fun getAccountBookMonthAsset( + isCurrent: Boolean, accountBookId: Long, year: Int, month: Int @@ -55,6 +59,8 @@ class FakeAccountBookRepository : AccountBookRepository { TODO("Not yet implemented") } + + override suspend fun postAccountBookInvitationReply(accountBookInvitationReply: AccountBookInvitationReply): Result { TODO("Not yet implemented") } @@ -124,20 +130,25 @@ class FakeAccountBookRepository : AccountBookRepository { TODO("Not yet implemented") } + override val accountBookId: Flow + get() = TODO("Not yet implemented") + override val accountBookName: Flow + get() = TODO("Not yet implemented") + override suspend fun updateCurrentAccountBookName(accountBookName: String): Result { - return runCatching { this.accountBookName = accountBookName } + return runCatching { this.fakeAccountBookName = accountBookName } } override suspend fun getCurrentAccountBookName(): Result { - return runCatching { accountBookName } + return runCatching { fakeAccountBookName } } override suspend fun updateCurrentAccountBookId(accountBookId: Long): Result { - return runCatching { this.accountBookId = accountBookId } + return runCatching { this.fakeAccountBookId = accountBookId } } override suspend fun getCurrentAccountBookId(): Result { - return runCatching { accountBookId } + return runCatching { fakeAccountBookId } } } \ No newline at end of file diff --git a/domain/src/test/java/com/uliga/domain/fakeRepository/FakeUserAuthRepository.kt b/domain/src/test/java/com/uliga/domain/fakeRepository/FakeUserAuthRepository.kt index e07a102..e257150 100644 --- a/domain/src/test/java/com/uliga/domain/fakeRepository/FakeUserAuthRepository.kt +++ b/domain/src/test/java/com/uliga/domain/fakeRepository/FakeUserAuthRepository.kt @@ -66,4 +66,12 @@ class FakeUserAuthRepository: UserAuthRepository { override suspend fun getId(): Result { return runCatching { id } } + + override suspend fun updateIsLogin(isLogin: Boolean): Result { + TODO("Not yet implemented") + } + + override suspend fun getIsLogin(): Result { + TODO("Not yet implemented") + } } \ No newline at end of file