@Test public void should_triggerErrorEvent_forError_fromReviewScreen() throws Exception { final EventTracker eventTracker = spy(EventTracker.class); new GiniVision.Builder().setEventTracker(eventTracker).build(); final ImageDocument imageDocument = new ImageDocumentFake(); final String errorMessage = "Something went wrong"; final AnalysisScreenPresenter presenter = createPresenter(imageDocument, errorMessage); presenter.start(); verify(eventTracker).onAnalysisScreenEvent(new Event<>(AnalysisScreenEvent.ERROR, Collections.singletonMap(AnalysisScreenEvent.ERROR_DETAILS_MAP_KEY.MESSAGE, errorMessage))); }
@Override public void start() { mStopped = false; createDocumentRenderer(); clearParcelableMemoryCache(); getView().showScanAnimation(); loadDocumentData(); showHintsForImage(); }
AnalysisScreenPresenter extends AnalysisScreenContract.Presenter { @Override public void start() { mStopped = false; createDocumentRenderer(); clearParcelableMemoryCache(); getView().showScanAnimation(); loadDocumentData(); showHintsForImage(); } }
AnalysisScreenPresenter extends AnalysisScreenContract.Presenter { @Override public void start() { mStopped = false; createDocumentRenderer(); clearParcelableMemoryCache(); getView().showScanAnimation(); loadDocumentData(); showHintsForImage(); } AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage); @VisibleForTesting  AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage,
            @NonNull final AnalysisInteractor analysisInteractor); }
AnalysisScreenPresenter extends AnalysisScreenContract.Presenter { @Override public void start() { mStopped = false; createDocumentRenderer(); clearParcelableMemoryCache(); getView().showScanAnimation(); loadDocumentData(); showHintsForImage(); } AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage); @VisibleForTesting  AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage,
            @NonNull final AnalysisInteractor analysisInteractor); @Override void hideError(); @Override void onNoExtractionsFound(); @Override void onDocumentAnalyzed(); @Override void showError(@NonNull final String message, final int duration); @Override void showError(@NonNull final String message, @NonNull final String buttonTitle,
            @NonNull final View.OnClickListener onClickListener); @Override void startScanAnimation(); @Override void stopScanAnimation(); @Override void setListener(@NonNull final AnalysisFragmentListener listener); @Override void start(); @Override void stop(); }
AnalysisScreenPresenter extends AnalysisScreenContract.Presenter { @Override public void start() { mStopped = false; createDocumentRenderer(); clearParcelableMemoryCache(); getView().showScanAnimation(); loadDocumentData(); showHintsForImage(); } AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage); @VisibleForTesting  AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage,
            @NonNull final AnalysisInteractor analysisInteractor); @Override void hideError(); @Override void onNoExtractionsFound(); @Override void onDocumentAnalyzed(); @Override void showError(@NonNull final String message, final int duration); @Override void showError(@NonNull final String message, @NonNull final String buttonTitle,
            @NonNull final View.OnClickListener onClickListener); @Override void startScanAnimation(); @Override void stopScanAnimation(); @Override void setListener(@NonNull final AnalysisFragmentListener listener); @Override void start(); @Override void stop();  }