Search in sources :

Example 6 with PreviewGenerator

use of com.newsrob.util.PreviewGenerator in project newsrob by marianokamp.

the class PG method testFindBiggestRelevantImage.

public void testFindBiggestRelevantImage() throws Exception {
    new PreviewGenerator(getInstrumentation().getContext(), new File(TEST_DIR), 60, 60, 3) {

        @Override
        protected File findBiggestImageFile() {
            biggestFoundImage = super.findBiggestImageFile();
            return biggestFoundImage;
        }
    }.generatePreview();
    assertNotNull(biggestFoundImage);
    assertEquals("big.jpgnr", biggestFoundImage.getName());
}
Also used : PreviewGenerator(com.newsrob.util.PreviewGenerator) File(java.io.File)

Aggregations

PreviewGenerator (com.newsrob.util.PreviewGenerator)6 File (java.io.File)6 Context (android.content.Context)1 Cursor (android.database.Cursor)1 Bitmap (android.graphics.Bitmap)1 SyncJobStatus (com.newsrob.EntryManager.SyncJobStatus)1 DownloadCancelledException (com.newsrob.download.DownloadCancelledException)1 DownloadException (com.newsrob.download.DownloadException)1 DownloadTimedOutException (com.newsrob.download.DownloadTimedOutException)1 Job (com.newsrob.jobs.Job)1 ModelUpdateResult (com.newsrob.jobs.ModelUpdateResult)1 SynchronizeModelFailed (com.newsrob.jobs.SynchronizeModelFailed)1 SynchronizeModelSucceeded (com.newsrob.jobs.SynchronizeModelSucceeded)1 IStorageAdapter (com.newsrob.storage.IStorageAdapter)1 Timing (com.newsrob.util.Timing)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 MalformedURLException (java.net.MalformedURLException)1 SocketException (java.net.SocketException)1