Coverage Summary for Class: AppRestarter (com.georgeci.moneysurfer.domain.backup)

Class Method, % Branch, % Line, % Instruction, %
AppRestarter 100% (1/1) 100% (1/1) 100% (1/1)
AppRestarter$DefaultImpls 0% (0/1) 0% (0/1) 0% (0/2)
Total 50% (1/2) 50% (1/2) 33.3% (1/3)


 package com.georgeci.moneysurfer.domain.backup
 
 import okio.Path
 
 /**
  * Locates the on-disk files that participate in a backup, per platform.
  * Implementations live in `:data-local` (`{Android,Ios,Jvm}BackupStorageLocator`)
  * and are bound to this interface in `SharedPlatformModule`.
  */
 interface BackupStorageLocator {
     val platformName: String
     fun moneySurferDbFile(): Path
     fun syncDbFile(): Path
     fun dataStoreFile(): Path
 }
 
 /**
  * Restarts the host process so newly-imported on-disk state is observed.
  *
  * iOS implementations cannot relaunch programmatically; they exit cleanly
  * and the calling layer surfaces a "please reopen" message.
  */
 interface AppRestarter {
     /**
      * `true` when [restart] only terminates the process and the user has to
      * open the app again by hand (iOS). Callers must show that as an explicit
      * message *before* invoking [restart], or a successful restore looks like
      * a crash.
      */
     val requiresManualRelaunch: Boolean get() = false
 
     fun restart()
 }