package com.mateuszkoslacz.moviper.rxsample.utils;

import com.mateuszkoslacz.moviper.rxsample.MoviperApplication;
import com.mateuszkoslacz.moviper.rxsample.di.DIProvider;
import com.mateuszkoslacz.moviper.rxsample.di.components.DaggerRepositoryComponent;
import com.mateuszkoslacz.moviper.rxsample.di.components.DaggerSpecificationComponent;
import com.mateuszkoslacz.moviper.rxsample.di.components.RepositoryComponent;
import com.mateuszkoslacz.moviper.rxsample.di.components.SpecificationComponent;
import com.mateuszkoslacz.moviper.rxsample.di.modules.specification.UserByUsernameStreamSpecificationModule;
import com.mateuszkoslacz.moviper.rxsample.utils.di.AllUsersSpecificationTestModule;
import com.mateuszkoslacz.moviper.rxsample.utils.di.UserRepositoryTestModule;


public class MoviperTestApplication extends MoviperApplication {

    @Override
    public void onCreate() {
        super.onCreate();

        DIProvider.init(this);
        SpecificationComponent specificationTestComponent = DaggerSpecificationComponent.builder()
                .allUsersSpecificationModule(new AllUsersSpecificationTestModule())
                .userByUsernameStreamSpecificationModule(new UserByUsernameStreamSpecificationModule())
                .build();


        RepositoryComponent repositoryComponent = DaggerRepositoryComponent.builder()
                .userRepositoryModule(new UserRepositoryTestModule())
                .build();

        DIProvider.setSpecificationComponent(specificationTestComponent);
        DIProvider.setRepositoryComponent(repositoryComponent);
    }
}

@@ -223,22 +223,16 @@
 ponents.
-Dagger
 Reposito
@@ -301,22 +301,16 @@
 ponents.
-Dagger
 Specific
@@ -360,32 +360,38 @@
 oviper.rxsample.
+utils.
 di.components.Re
@@ -380,32 +380,38 @@
 s.di.components.
+Dagger
 RepositoryCompon
@@ -396,32 +396,36 @@
 DaggerRepository
+Test
 Component;%0Aimpor
@@ -454,32 +454,38 @@
 oviper.rxsample.
+utils.
 di.components.Sp
@@ -474,32 +474,38 @@
 s.di.components.
+Dagger
 SpecificationCom
@@ -493,32 +493,36 @@
 gerSpecification
+Test
 Component;%0Aimpor
@@ -559,16 +559,22 @@
 xsample.
+utils.
 di.modul
@@ -580,42 +580,16 @@
 les.
-specification.UserByUsernameStream
+AllUsers
 Spec
@@ -593,24 +593,28 @@
 pecification
+Test
 Module;%0Aimpo
@@ -661,24 +661,44 @@
 tils.di.
-AllUsers
+modules.UserByUsernameStream
 Specific
@@ -766,16 +766,24 @@
 tils.di.
+modules.
 UserRepo
@@ -1005,36 +1005,32 @@
 nt specification
-Test
 Component = Dagg
@@ -1036,32 +1036,36 @@
 gerSpecification
+Test
 Component.builde
@@ -1098,32 +1098,36 @@
 ersSpecification
+Test
 Module(new AllUs
@@ -1202,24 +1202,28 @@
 pecification
+Test
 Module(new U
@@ -1254,16 +1254,20 @@
 fication
+Test
 Module()
@@ -1295,17 +1295,16 @@
 ild();%0A%0A
-%0A
         
@@ -1353,32 +1353,36 @@
 DaggerRepository
+Test
 Component.builde
@@ -1416,16 +1416,20 @@
 pository
+Test
 Module(n
@@ -1536,36 +1536,32 @@
 nt(specification
-Test
 Component);%0A    

swap startup components for test ones