@Test public void browserSwitchWithOptions_startsBrowserSwitch() { sut.browserSwitchClient = browserSwitchClient; BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions(); sut.browserSwitch(browserSwitchOptions); verify(browserSwitchClient).start(browserSwitchOptions, sut); }
@SuppressWarnings("WeakerAccess") public void browserSwitch(int requestCode, String url) { BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions() .requestCode(requestCode) .url(Uri.parse(url)); browserSwitchClient.start(browserSwitchOptions, this); }
BrowserSwitchFragment extends Fragment implements BrowserSwitchListener { @SuppressWarnings("WeakerAccess") public void browserSwitch(int requestCode, String url) { BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions() .requestCode(requestCode) .url(Uri.parse(url)); browserSwitchClient.start(browserSwitchOptions, this); } }
BrowserSwitchFragment extends Fragment implements BrowserSwitchListener { @SuppressWarnings("WeakerAccess") public void browserSwitch(int requestCode, String url) { BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions() .requestCode(requestCode) .url(Uri.parse(url)); browserSwitchClient.start(browserSwitchOptions, this); }  }
BrowserSwitchFragment extends Fragment implements BrowserSwitchListener { @SuppressWarnings("WeakerAccess") public void browserSwitch(int requestCode, String url) { BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions() .requestCode(requestCode) .url(Uri.parse(url)); browserSwitchClient.start(browserSwitchOptions, this); }  @Override void onAttach(@NonNull Context context); @Override void onCreate(Bundle savedInstanceState); @Override void onResume(); String getReturnUrlScheme(); @SuppressWarnings("WeakerAccess") void browserSwitch(int requestCode, String url); @SuppressWarnings("WeakerAccess") void browserSwitch(int requestCode, Intent intent); void browserSwitch(BrowserSwitchOptions browserSwitchOptions); abstract void onBrowserSwitchResult(int requestCode, BrowserSwitchResult result, @Nullable Uri returnUri); }
BrowserSwitchFragment extends Fragment implements BrowserSwitchListener { @SuppressWarnings("WeakerAccess") public void browserSwitch(int requestCode, String url) { BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions() .requestCode(requestCode) .url(Uri.parse(url)); browserSwitchClient.start(browserSwitchOptions, this); }  @Override void onAttach(@NonNull Context context); @Override void onCreate(Bundle savedInstanceState); @Override void onResume(); String getReturnUrlScheme(); @SuppressWarnings("WeakerAccess") void browserSwitch(int requestCode, String url); @SuppressWarnings("WeakerAccess") void browserSwitch(int requestCode, Intent intent); void browserSwitch(BrowserSwitchOptions browserSwitchOptions); abstract void onBrowserSwitchResult(int requestCode, BrowserSwitchResult result, @Nullable Uri returnUri);  }