@Test public void shouldSaveUserDataAndSupportedFacilityCodeToDBWhenMultipleProgramToggleON() throws Exception { User user = UserBuilder.defaultUser(); UserResponse userResponse = new UserResponse(); userResponse.setUserInformation(user); userResponse.setFacilitySupportedPrograms(Arrays.asList( new ProgramBuilder().setProgramCode("via_code").setProgramName("VIA name").build(), new ProgramBuilder().setProgramCode("mmia_code").setProgramName("MMIA name").build(), new ProgramBuilder().setProgramCode("nutrition_code").setProgramName("Nutrition name").setParentCode("via_code").build() )); presenter.saveUserDataToLocalDatabase(userResponse); verify(userRepository).createOrUpdate(user); }
protected void saveUserDataToLocalDatabase(UserResponse response) throws LMISException { userRepository.createOrUpdate(response.getUserInformation()); }
LoginPresenter extends Presenter { protected void saveUserDataToLocalDatabase(UserResponse response) throws LMISException { userRepository.createOrUpdate(response.getUserInformation()); } }
LoginPresenter extends Presenter { protected void saveUserDataToLocalDatabase(UserResponse response) throws LMISException { userRepository.createOrUpdate(response.getUserInformation()); }  }
LoginPresenter extends Presenter { protected void saveUserDataToLocalDatabase(UserResponse response) throws LMISException { userRepository.createOrUpdate(response.getUserInformation()); }  @Override void attachView(BaseView v); void startLogin(String userName, String password, boolean fromReSync); void onLoginFailed(); void syncLocalUserData(Subscriber<SyncLocalUserProgress> subscriber); @NonNull Subscriber<SyncLocalUserProgress> getSyncLocalUserDataSubscriber(); }
LoginPresenter extends Presenter { protected void saveUserDataToLocalDatabase(UserResponse response) throws LMISException { userRepository.createOrUpdate(response.getUserInformation()); }  @Override void attachView(BaseView v); void startLogin(String userName, String password, boolean fromReSync); void onLoginFailed(); void syncLocalUserData(Subscriber<SyncLocalUserProgress> subscriber); @NonNull Subscriber<SyncLocalUserProgress> getSyncLocalUserDataSubscriber();  }