Class MidnightTimer is now open

Apparently Mockito v.2.28.2 still can't handle mocking of kotlin classes
properly because kotlin classes are closed by default. While waiting
for the proper fix we open the MidnightTimer class.

Please refer to the pull request discussion on
https://github.com/iSoron/uhabits/pull/699
pull/699/head
MarKco 5 years ago
parent 2caa4de55d
commit 4edc5ec5d7

@ -29,7 +29,7 @@ import javax.inject.Inject
* A class that emits events when a new day starts.
*/
@AppScope
class MidnightTimer @Inject constructor() {
open class MidnightTimer @Inject constructor() {
private val listeners: MutableList<MidnightListener> = LinkedList()
private lateinit var executor: ScheduledExecutorService

Loading…
Cancel
Save