@Test public void setWolmoFragmentNotExtendingFragment() { IWolmoFragment wolmoFragment = mock(IWolmoFragment.class); exception.expect(IllegalArgumentException.class); mWolmoFragmentHandler.onCreate(wolmoFragment); }
void onCreate(@NonNull IWolmoFragment wolmoFragment) { mLogger.setTag(WolmoFragmentHandler.class.getSimpleName()); setFragment(wolmoFragment); final @Nullable Boolean handleArgs = mWolmoFragment.handleArguments(mFragment.getArguments()); if (handleArgs == null || !handleArgs) { mLogger.e(mFragment.getClass().getSimpleName() + " - The fragment's handleArguments() returned false."); mToastFactory.show(R.string.unknown_error); mFragment.requireActivity().finish(); } }
WolmoFragmentHandler { void onCreate(@NonNull IWolmoFragment wolmoFragment) { mLogger.setTag(WolmoFragmentHandler.class.getSimpleName()); setFragment(wolmoFragment); final @Nullable Boolean handleArgs = mWolmoFragment.handleArguments(mFragment.getArguments()); if (handleArgs == null || !handleArgs) { mLogger.e(mFragment.getClass().getSimpleName() + " - The fragment's handleArguments() returned false."); mToastFactory.show(R.string.unknown_error); mFragment.requireActivity().finish(); } } }
WolmoFragmentHandler { void onCreate(@NonNull IWolmoFragment wolmoFragment) { mLogger.setTag(WolmoFragmentHandler.class.getSimpleName()); setFragment(wolmoFragment); final @Nullable Boolean handleArgs = mWolmoFragment.handleArguments(mFragment.getArguments()); if (handleArgs == null || !handleArgs) { mLogger.e(mFragment.getClass().getSimpleName() + " - The fragment's handleArguments() returned false."); mToastFactory.show(R.string.unknown_error); mFragment.requireActivity().finish(); } } @Inject  WolmoFragmentHandler(@NonNull ToastFactory toastFactory,
	                     @NonNull Logger logger,
	                     @NonNull T presenter); }
WolmoFragmentHandler { void onCreate(@NonNull IWolmoFragment wolmoFragment) { mLogger.setTag(WolmoFragmentHandler.class.getSimpleName()); setFragment(wolmoFragment); final @Nullable Boolean handleArgs = mWolmoFragment.handleArguments(mFragment.getArguments()); if (handleArgs == null || !handleArgs) { mLogger.e(mFragment.getClass().getSimpleName() + " - The fragment's handleArguments() returned false."); mToastFactory.show(R.string.unknown_error); mFragment.requireActivity().finish(); } } @Inject  WolmoFragmentHandler(@NonNull ToastFactory toastFactory,
	                     @NonNull Logger logger,
	                     @NonNull T presenter); @NonNull T getPresenter(); }
WolmoFragmentHandler { void onCreate(@NonNull IWolmoFragment wolmoFragment) { mLogger.setTag(WolmoFragmentHandler.class.getSimpleName()); setFragment(wolmoFragment); final @Nullable Boolean handleArgs = mWolmoFragment.handleArguments(mFragment.getArguments()); if (handleArgs == null || !handleArgs) { mLogger.e(mFragment.getClass().getSimpleName() + " - The fragment's handleArguments() returned false."); mToastFactory.show(R.string.unknown_error); mFragment.requireActivity().finish(); } } @Inject  WolmoFragmentHandler(@NonNull ToastFactory toastFactory,
	                     @NonNull Logger logger,
	                     @NonNull T presenter); @NonNull T getPresenter();  }