Skip to content

Instantly share code, notes, and snippets.

View MikolajKakol's full-sized avatar
😸

Mikołaj Kąkol MikolajKakol

😸
View GitHub Profile
@MikolajKakol
MikolajKakol / OkHttp provider
Created October 9, 2014 13:46
Proxy+gradle+OkHttp config
@Provides
@Singleton
OkHttpClient okHttpClient() {
OkHttpClient client = new OkHttpClient();
if (BuildConfig.OMIT_HTTPS_SECURITY) {
ignoreHttpsSecurity(client);
}
//noinspection ConstantConditions
if (BuildConfig.HTTP_PROXY_INET != null) {
client.setProxy(new Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(BuildConfig.HTTP_PROXY_INET, BuildConfig.HTTP_PROXY_PORT)));
package net.test;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Func1;
import java.util.Arrays;
import java.util.List;
import junit.framework.TestCase;
import rx.Observable;
import rx.Observer;
import rx.subjects.PublishSubject;
import rx.util.functions.Func1;
import rx.util.functions.Func2;
@MikolajKakol
MikolajKakol / gist:8985583
Last active August 29, 2015 13:56
BehaviorSubject isue test
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import junit.framework.TestCase;
import org.junit.Test;
import org.junit.runner.RunWith;