This file contains 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
git branch --merged develop | grep -v master | grep -v develop | xargs -L1 git branch -d |
This file contains 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" /> | |
<!-- when.js Promises implementation --> | |
<script src="https://raw.github.com/cujojs/when/master/when.js"></script> | |
<!-- Unit testing and mocking framework --> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script> |
This file contains 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
0x6C45A5019F0e56Baad94B014961cD3EEbe95ceF8 |
This file contains 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
0xE4E0A63f6f275bb45279046f27BB8436ecFdfF21 |
This file contains 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
private class HttpInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Chain chain) throws IOException { | |
Request request = chain.request(); | |
//Build new request | |
Request.Builder builder = request.newBuilder(); | |
builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |
This file contains 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
android.applicationVariants.all { | |
def aptOutputDir = new File(buildDir, "generated/source/apt/${it.unitTestVariant.dirName}") | |
it.unitTestVariant.addJavaSourceFoldersToModel(aptOutputDir) | |
} |
This file contains 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
@Module | |
public class FlombulatorTestModule { | |
@Provides | |
Flumbolator provideTestFlombulator() { | |
System.out.println("I the mocked flumbolator have been summoned, behold my mock power"); | |
Flumbolator flum = Mockito.mock(Flumbolator.class); | |
when(flum.frumbolateMe()).thenReturn("flumbolate test"); | |
return flum; | |
} |
This file contains 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
@Subcomponent(modules = { | |
FlombulatorTestModule.class, | |
TestMainActivitySubComponent.MainActivityModule.class | |
}) | |
public interface TestMainActivitySubComponent extends AndroidInjector<MainActivity> { | |
@Module | |
class MainActivityModule {} | |
@Subcomponent.Builder |
This file contains 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
@Module(subcomponents = { | |
TestMainActivitySubComponent.class, | |
TestSecondaryActivitySubComponent.class | |
}) | |
public abstract class TestBindingModule { | |
@Binds | |
@IntoMap | |
@ActivityKey(MainActivity.class) | |
abstract AndroidInjector.Factory<? extends Activity> bindMainActivityInjectorFactory(TestMainActivitySubComponent.Builder builder); |
This file contains 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
@Component( | |
modules = { | |
AndroidInjectionModule.class, | |
TestBindingModule.class, | |
TestApplicationComponent.TestAppModule.class | |
}) | |
interface TestApplicationComponent { | |
void inject(TestApplication app); |