Simply copy a link to add it to your favourite read later service
- Getting some experience writing kotlin for prod and test code
- Trying the MVVM pattern out
- Trying out how having a Android instead of a POJO prenter impacts testing
- Trying out Dagger 2
- Integrating Travis CI or some other cloud service for testing
- how do I mock a kotlin class with mockito? is it even possible? Something like
AppPreferences::class
returns akotlin.reflect.KClass
reference and not ajava.lang.Class
one, needed by mockito. UsingAppPreferences::class.java
returns the java class but the mocking does not work.
- when mocking a method defined in a kotlin class, the parameters must be optionals in order for
the mocking to work, otherwise the tests will fail with an
java.lang.IllegalStateException: any (SomeClass::class.java) must not be null
- when mocking a kotlin class it is necessary to create an interface and mock it instead of the implementation, otherwise the mocks won' work. Is there a better way to do this?
- Make the app build on Travis CI:
- the
lintVital
task always failed with PermGen out of memory. The solution was to add this config line in the Travis yml file:GRADLE_OPTS="$GRADLE_OPTS -XX:MaxPermSize=256m"
- the