@Test public void getErrorMessageTest() { final String errorMessage = postsFragment.getErrorMessage(new Throwable(), false); assertThat(errorMessage).isEqualTo("Error while loading posts!"); }
@Override protected String getErrorMessage(final Throwable throwable, final boolean pullToRefresh) { return "Error while loading posts!"; }
PostsFragment extends MvpLceFragment<SwipeRefreshLayout, List<Post>, PostsView, PostsPresenter> implements PostsView, SwipeRefreshLayout.OnRefreshListener { @Override protected String getErrorMessage(final Throwable throwable, final boolean pullToRefresh) { return "Error while loading posts!"; } }
PostsFragment extends MvpLceFragment<SwipeRefreshLayout, List<Post>, PostsView, PostsPresenter> implements PostsView, SwipeRefreshLayout.OnRefreshListener { @Override protected String getErrorMessage(final Throwable throwable, final boolean pullToRefresh) { return "Error while loading posts!"; }  }
PostsFragment extends MvpLceFragment<SwipeRefreshLayout, List<Post>, PostsView, PostsPresenter> implements PostsView, SwipeRefreshLayout.OnRefreshListener { @Override protected String getErrorMessage(final Throwable throwable, final boolean pullToRefresh) { return "Error while loading posts!"; }  @Override View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container,
                             @Nullable final Bundle savedInstanceState); @Override void onViewCreated(final View view, @Nullable final Bundle savedInstance); @Override void loadData(final boolean pullToRefresh); @Override PostsPresenter createPresenter(); @Override void onDestroyView(); @Override void notifyUserAboutUsersUnavailability(); @Override void notifyUserAboutInternetUnavailability(); @Override void showLoading(final boolean pullToRefresh); @Override void setData(final List<Post> posts); @Override void showContent(); @Override void showError(final Throwable throwable, final boolean pullToRefresh); @Override void onRefresh(); }
PostsFragment extends MvpLceFragment<SwipeRefreshLayout, List<Post>, PostsView, PostsPresenter> implements PostsView, SwipeRefreshLayout.OnRefreshListener { @Override protected String getErrorMessage(final Throwable throwable, final boolean pullToRefresh) { return "Error while loading posts!"; }  @Override View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container,
                             @Nullable final Bundle savedInstanceState); @Override void onViewCreated(final View view, @Nullable final Bundle savedInstance); @Override void loadData(final boolean pullToRefresh); @Override PostsPresenter createPresenter(); @Override void onDestroyView(); @Override void notifyUserAboutUsersUnavailability(); @Override void notifyUserAboutInternetUnavailability(); @Override void showLoading(final boolean pullToRefresh); @Override void setData(final List<Post> posts); @Override void showContent(); @Override void showError(final Throwable throwable, final boolean pullToRefresh); @Override void onRefresh();  }