Fix BackupSubscriptionCheckJob tests.

This commit is contained in:
Alex Hart
2025-10-03 15:43:25 -03:00
committed by Michelle Tang
parent 1d403d3dee
commit 14cc0f12a6
9 changed files with 194 additions and 100 deletions

View File

@@ -246,6 +246,16 @@ sealed class NetworkResult<T>(
}
}
/**
* Returns the result if successful, otherwise null.
*/
fun successOrNull(): T? {
return when (this) {
is Success -> result
else -> null
}
}
/**
* Returns the [Throwable] associated with the result, or null if the result is successful.
*/