PhotoCaptureHelper extends CaptureHelper { public File getTempCaptureFile() { return new File(getDir(), "temp.jpg"); } PhotoCaptureHelper(RapidFtrApplication context); File getTempCaptureFile(); Calendar getCaptureTime(); void setCaptureTime(); Bitmap getCapture(); void deleteCaptures(); Bitmap getDefaultThumbnail(); void savePhoto(Bitmap original, int rotationDegree, String fileNameWithoutExtension); void saveThumbnail(Bitmap original, int rotationDegree, String fileNameWithoutExtension); Bitmap loadThumbnail(String fileNameWithoutExtension); Bitmap loadPhoto(String fileNameWithoutExtension); InputStream getDecodedImageStream(String fileNameWithoutExtension); Bitmap getThumbnailOrDefault(String fileNameWithoutExtension); int getPictureRotation(); void convertPhoto(String photo, String existingKey, String newKey); static final int THUMBNAIL_WIDTH; static final int THUMBNAIL_HEIGHT; static final int JPEG_QUALITY; static final int PHOTO_WIDTH; static final int PHOTO_HEIGHT; static final int QUALITY; }
@Test public void testCatureFileUnderCaptureDir() { String path = photoCaptureHelper.getDir().getAbsolutePath(); String file = photoCaptureHelper.getTempCaptureFile().getAbsolutePath(); assertThat(file, startsWith(path)); }