It took a while but finally, I’ve got an opportunity to use Junit Jupiter (Junit5) in an Android project. And it wasn’t easy as I expected, but you know, with tests it’s never easy 🙂
Category: Tests
-
Mock final classes on Kotlin
internal class Foo { internal fun bar(x: Int, y: Int, zip: Zip) = x + y + zip.doIt() } internal class Zip { internal fun doIt() = 0 }When we have two classes like above and try to mock Zip class like below:
(more…) -
Windows batch file – Short tutorial + Run tests from multiple modules
Let’s start with some batch basics. If you are already familiar with them skip this section.
- @echo off – Should be added at the top of your batch script to prevent printing all commands.
- echo Some text – Output: “Some text”
- echo. – Empty line
- set /a index=0 – Set numeric variable
- echo Index is %index% – Output: “Index is 0”
- Rem It is a comment
- :: It is a comment too
- echo Some text>> test.txt – Write “Some text” to test.txt file.