@Test public void initializeTest() throws CourseContentNotValidException { CourseUnitWebViewFragment fragment = CourseUnitWebViewFragment.newInstance(getHtmlUnit()); SupportFragmentTestUtil.startVisibleFragment(fragment, PreLoadingListenerActivity.class, android.R.id.content); View view = fragment.getView(); assertNotNull(view); View courseUnitWebView = view.findViewById(R.id.webview); assertNotNull(courseUnitWebView); assertThat(courseUnitWebView).isInstanceOf(WebView.class); WebView webView = (WebView) courseUnitWebView; assertTrue(webView.getSettings().getJavaScriptEnabled()); }
public static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit) { CourseUnitWebViewFragment fragment = new CourseUnitWebViewFragment(); Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); fragment.setArguments(args); return fragment; }
CourseUnitWebViewFragment extends CourseUnitFragment { public static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit) { CourseUnitWebViewFragment fragment = new CourseUnitWebViewFragment(); Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); fragment.setArguments(args); return fragment; } }
CourseUnitWebViewFragment extends CourseUnitFragment { public static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit) { CourseUnitWebViewFragment fragment = new CourseUnitWebViewFragment(); Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); fragment.setArguments(args); return fragment; }  }
CourseUnitWebViewFragment extends CourseUnitFragment { public static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit) { CourseUnitWebViewFragment fragment = new CourseUnitWebViewFragment(); Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); fragment.setArguments(args); return fragment; }  static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit); @Override View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState); @Override void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState); @Override void setUserVisibleHint(boolean isVisibleToUser); @Override void onResume(); @Override void onPause(); @Override void onDestroy(); @Override void onDestroyView(); void onEventMainThread(UnitLoadedEvent event); }
CourseUnitWebViewFragment extends CourseUnitFragment { public static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit) { CourseUnitWebViewFragment fragment = new CourseUnitWebViewFragment(); Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); fragment.setArguments(args); return fragment; }  static CourseUnitWebViewFragment newInstance(HtmlBlockModel unit); @Override View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState); @Override void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState); @Override void setUserVisibleHint(boolean isVisibleToUser); @Override void onResume(); @Override void onPause(); @Override void onDestroy(); @Override void onDestroyView(); void onEventMainThread(UnitLoadedEvent event);  }