VideoIntent extends ContentIntent<VideoIntent> { @NonNull public static Intent createCameraIntent() { return createCameraIntent((Uri) null); }  @NonNull static Intent createGalleryIntent(); @NonNull static Intent createCameraIntent(); @NonNull static Intent createCameraIntent(@Nullable final File outputFile); @NonNull static Intent createCameraIntent(@Nullable final Uri outputUri); @Nullable static File createVideoFile(); @Nullable static File createVideoFile(@NonNull final String fileName); @SuppressWarnings("ConstantConditions") @Override VideoIntent withDefaultHandlers(@NonNull final Context context); @Override VideoIntent input(@Nullable final Uri uri); @Override VideoIntent output(@Nullable final Uri uri); static final int REQUEST_CODE_GALLERY; static final int REQUEST_CODE_CAMERA; static final String VIDEO_FILE_NAME_FORMAT; }
@Test public void testCreateCameraIntent() { final Intent intent = VideoIntent.createCameraIntent(); assertThat(intent, is(notNullValue())); assertThat(intent.getAction(), is(MediaStore.ACTION_VIDEO_CAPTURE)); assertThat(intent.getParcelableExtra(MediaStore.EXTRA_OUTPUT), is(nullValue())); }
@Test public void testCreateCameraIntentWithOutputFile() { final File outputFile = new File("content: final Intent intent = VideoIntent.createCameraIntent(outputFile); assertThat(intent, is(notNullValue())); assertThat(intent.getAction(), is(MediaStore.ACTION_VIDEO_CAPTURE)); assertThat(intent.<Uri>getParcelableExtra(MediaStore.EXTRA_OUTPUT), is(Uri.fromFile(outputFile))); }
@Test public void testCreateCameraIntentWithNullOutputFile() { final Intent intent = VideoIntent.createCameraIntent((File) null); assertThat(intent, is(notNullValue())); assertThat(intent.getAction(), is(MediaStore.ACTION_VIDEO_CAPTURE)); assertThat(intent.getParcelableExtra(MediaStore.EXTRA_OUTPUT), is(nullValue())); }
@Test public void testCreateCameraIntentWithOutputUri() { final Uri outputUri = Uri.parse("content: final Intent intent = VideoIntent.createCameraIntent(outputUri); assertThat(intent, is(notNullValue())); assertThat(intent.getAction(), is(MediaStore.ACTION_VIDEO_CAPTURE)); assertThat(intent.<Uri>getParcelableExtra(MediaStore.EXTRA_OUTPUT), is(outputUri)); }