Skip to content

Instantly share code, notes, and snippets.

@nimeacuerdo
nimeacuerdo / CallIntercepterModule.kt
Created April 6, 2021 07:45
Another module that requires initial permissions
@Module
class CallInterceptorPermissionsModule {
@Provides
@ElementsIntoSet
@InitialPermission
fun provideInitialPermissions(
shouldEnableInitialPermissions: ShouldEnableInitialPermissions
): Set<InitialPermissionData> = setOf(
InitialPermissionData(
@nimeacuerdo
nimeacuerdo / ContactsModule.kt
Created April 6, 2021 07:03
Example of module that declares initial permissions
@Module
class ContactsModule {
@Provides
@ElementsIntoSet
@InitialPermission
fun provideInitialPermissions(): Set<InitialPermissionData> {
return if (ContactsFeatureStatus.isEnabled) {
setOf(
InitialPermissionData(
TEST
public class DownloadStuffInteractorTest extends UnitTest {
private static final String ANY_URL = "http://www.wherever.com";
private static final String ANY_FILE_NAME = "file.pdf";
private static final EmailWithStuff EMAIL = new EmailWithStuff(ANY_URL, ANY_FILE_NAME);
@Mock
private StuffDownloader StuffDownloader;
public function moveToElement($toElement, $curl_opts = array()) {
$this->actions[] = '$this->session->moveto(array("element" => "' . $toElement->getID() . '"), ' . unwind_associated_array($curl_opts) . ');';
return $this;
}