This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity | |
import android.app.Dialog | |
import android.content.Context | |
import android.view.View | |
import androidx.fragment.app.Fragment | |
import androidx.test.platform.app.InstrumentationRegistry | |
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation | |
import com.facebook.testing.screenshot.Screenshot | |
import com.facebook.testing.screenshot.ViewHelpers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.gson.Gson | |
import com.google.gson.JsonElement | |
import com.google.gson.JsonParser | |
import okhttp3.Headers | |
import okhttp3.mockwebserver.MockResponse | |
import okhttp3.mockwebserver.MockWebServer | |
import okhttp3.mockwebserver.RecordedRequest | |
import org.apache.commons.io.FileUtils | |
import org.junit.After |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Help : To compress file use argument with directory" | |
exit 0 | |
fi | |
filename="${1}.cbz" | |
if [ -e "$filename" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.pedrovgs | |
object TestConfig { | |
val runningTests by lazy { | |
isRunningUITests() || isRunningRobolectricTests() | |
} | |
private fun isRunningRobolectricTests(): Boolean = checkIfClassIsAvailable("org.robolectric.RobolectricTestRunner") | |
private fun isRunningUITests(): Boolean = checkIfClassIsAvailable("com.github.pedrovgs.MyAndroidTestRunner") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class IsRunningTests { | |
static func check() -> Bool { | |
guard let value = ProcessInfo.processInfo.environment["IS_RUNNING_TESTS"] else { | |
return false | |
} | |
return value == "true" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.lifecycle.* | |
import kotlinx.coroutines.CoroutineDispatcher | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.MutableStateFlow | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.withContext | |
abstract class ComposeViewModel<C, E> : ViewModel(), LifecycleObserver { |
OlderNewer