Android Open Source - android-unittesting Data Module






From Project

Back to project page android-unittesting.

License

The source code is released under:

Apache License

If you think the Android project android-unittesting listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.hp.mvp;
//from  w  ww  .  ja  va2 s .  com

import android.content.Context;


import com.hp.mvp.data.DataProvider;
import com.hp.mvp.data.SqlLiteProvider;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by david on 5/4/14.
 */

@Module(
        injects = {
                MainPresenter.class
        }
)

public class DataModule {

    private MainApplication application;
    private Context context;

    public DataModule(MainApplication app){
        this.application = app;
        this.context = this.application.getApplicationContext();
    }

    @Provides
    @Singleton
    DataProvider provideDataProvider(){
        return new SqlLiteProvider(context);
    }
}




Java Source Code List

com.devfest.dagger.app.DataModule.java
com.devfest.dagger.app.MainActivity.java
com.devfest.dagger.app.MainApplication.java
com.devfest.dagger.app.ToDoAdapter.java
com.devfest.dagger.data.DataProvider.java
com.devfest.dagger.data.SqlLiteProvider.java
com.devfest.dagger.data.ToDo.java
com.hp.mvp.DataModule.java
com.hp.mvp.MainActivity.java
com.hp.mvp.MainApplication.java
com.hp.mvp.MainPresenter.java
com.hp.mvp.ToDoAdapter.java
com.hp.mvp.ToDoPresenter.java
com.hp.mvp.ToDoView.java
com.hp.mvp.data.DataProvider.java
com.hp.mvp.data.SqlLiteProvider.java
com.hp.mvp.data.ToDo.java