Search in sources :

Example 1 with TextDrawable

use of email.schaal.ocreader.util.TextDrawable in project ocreader by schaal.

the class FaviconLoaderTest method testGetDrawable.

@Test
public void testGetDrawable() throws Exception {
    Feed feed = new Feed();
    feed.setName("Test");
    feed.setUrl("http://example.com");
    feed.setFaviconLink(null);
    assertTrue(FaviconLoader.getDrawable(RuntimeEnvironment.application, feed) instanceof TextDrawable);
    assertEquals(AppCompatResources.getDrawable(RuntimeEnvironment.application, R.drawable.ic_feed_icon), FaviconLoader.getDrawable(RuntimeEnvironment.application, null));
// TODO: 01.08.16 Test feed with favicon
}
Also used : TextDrawable(email.schaal.ocreader.util.TextDrawable) Feed(email.schaal.ocreader.database.model.Feed) Test(org.junit.Test)

Aggregations

Feed (email.schaal.ocreader.database.model.Feed)1 TextDrawable (email.schaal.ocreader.util.TextDrawable)1 Test (org.junit.Test)1