Skip to content

Instantly share code, notes, and snippets.


Miguel Aragues Maragues

  • Zaragoza, Spain
View GitHub Profile
View Sum Property Based tested
class PropertyTestSum : StringSpec({
"Sum is commutative " {
assertAll { a: Int, b: Int ->
sum(a, b) shouldBe sum(b, a)
"Sum is associative " {
assertAll { a: Int, b: Int, c: Int ->
sum(a, b, c) shouldBe sum(a, c, b)
* This rule registers SchedulerHooks for RxJava and RxAndroid to ensure that subscriptions
* always subscribeOn and observeOn Schedulers.immediate().
* Warning, this rule will resetProcedureStatus RxAndroidPlugins and RxJavaPlugins after each test so
* if the application code uses RxJava plugins this may affect the behaviour of the testing method.
* <p>
* See
* See
Maragues / Picasso
Last active Aug 10, 2016
Implementation and usage of an IdlingResource that waits for Picasso actions to finish.
View Picasso

Note that the file lives in the package as Picasso. Otherwise we don't have access to targetToAction

package com.squareup.picasso;

public class PicassoIdlingResource implements IdlingResource, ActivityLifecycleCallback {
  protected ResourceCallback callback;

  WeakReference<Picasso> picassoWeakReference;
Maragues / DataDroidOkHttp
Created Oct 1, 2013
DataDroid + OkHttp Integration through reflection
View DataDroidOkHttp
public static ConnectionResult execute(...){
URL url = null;
String outputText = null;
switch (method) {
case GET:
case DELETE:
String fullUrlValue = urlValue;
if (paramBuilder.length() > 0) {
View build.gradle
// additional required configuration to hook into the build script
android {
signingConfigs {
buildTypes {
release {
signingConfig signingConfigs.release
You can’t perform that action at this time.