@Test public void testScriptFetcher_MockWebServer_CategoryDTOIsPopulated() { remoteAvailableInstallers.populate(); assertEquals("Accessories", observer.getDTO().get(0).getName()); assertEquals(2, observer.getDTO().get(0).getId()); assertEquals(CategoryDTO.CategoryType.INSTALLERS, observer.getDTO().get(0).getType()); }
@Test public void testScriptFetcher_MockWebServer_ApplicationsDTOIsPopulated() { remoteAvailableInstallers.populate(); List<ApplicationDTO> applications = observer.getDTO().get(0).getApplications(); assertEquals("", applications.get(0).getDescription()); assertEquals(373, applications.get(0).getId()); assertEquals( "http://files.playonlinux.com/resources/icones_install/7-Zip", applications.get(0).getIconUrl()); assertEquals(2, applications.get(0).getMiniaturesUrls().size()); assertEquals("7-Zip", applications.get(0).getName()); assertEquals("URL1", applications.get(0).getMiniaturesUrls().get(0)); assertEquals("URL2", applications.get(0).getMiniaturesUrls().get(1)); assertEquals("Amazon Description", applications.get(1).getDescription()); assertEquals(1265, applications.get(1).getId()); assertEquals( "http://files.playonlinux.com/resources/icones_install/Amazon Kindle", applications.get(1).getIconUrl()); assertEquals(0, applications.get(1).getMiniaturesUrls().size()); assertEquals("Amazon Kindle", applications.get(1).getName()); }