Build a Clean Architecture Wallet App with Unit Tests - Android Studio Tutorial

preview_player
Показать описание
In this video we will build a Clean Architecture wallet application with a lot of Unit Tests. We will validate the business logic which is mainly in the use cases (Clean Architecture) with different test cases to make sure that our logic works properly.

Get the source code here:

00:00 Introduction & dependencies
03:00 Business logic and unit tests
28:35 UI and ViewModel
Рекомендации по теме
Комментарии
Автор

I'm loving the work you're doing for the community ))

nymexe
Автор

Thanks for the video.

In regards to the use case for parsing the ParseTransactionValueInputUseCase, here are some examples that are not working as expected with the current logic:
.0, .00, -5, -55, -0, -00, [random char][Number] for example (N5123), ....
These are good real examples to write new tests for and to modify the current logic for. :D

I've noticed one more thing, if, we actually do change the locale to a different one than the us one, then the app doesn't work ok... submit button becomes unresponsive. It seems like "some float number".toFloatOrNull() returns a null in this case. Replacing the current decimal separator with a dot before calling toFloatOrNull() can be one way of fixing it...

rollebonmarquis
Автор

very good video ... would be nice if you could do a video on kotest

SiamakAshrafi
Автор

Cute trick: you can use sentence-like names for the test functions like this: fun `Test Float To German Format Without Fractional Part`()
This only works for the Unit test (like this video) and not for the Instrumented tests.

ubersticks
Автор

Instead of Y offsetting the before, separator and after Text()s with magic values to align them you can use modifier = Modifier.alignByBaseline() on each of the Text()s

ubersticks
welcome to shbcf.ru