@Test public void addsAReleaseToThePlatform() throws Exception { List<EclipseRelease> windowsProducts = eclipseDownloads.getPlatforms().get("windows").getReleases(); assertThat(windowsProducts.size(), equalTo(1)); assertThat(windowsProducts.get(0).getName(), equalTo("Eclipse Kepler")); }
@Test public void addsTwoPackages() throws Exception { List<EclipsePackage> windowsPackages = eclipseDownloads.getPlatforms().get("windows").getReleases().get(0).getPackages(); assertThat(windowsPackages.size(), equalTo(2)); assertThat(windowsPackages.get(0).getName(), equalTo("Eclipse Standard 4.3")); assertThat(windowsPackages.get(1).getName(), equalTo("Eclipse IDE for Java EE Developers")); }
@Test public void addsDownloadLinkToEachPackage() throws Exception { List<EclipsePackage> windowsPackages = eclipseDownloads.getPlatforms().get("windows").getReleases().get(0).getPackages(); List<DownloadLink> standardDownloadLinks = windowsPackages.get(0).getArchitectures().get(0).getDownloadLinks(); List<DownloadLink> javaEEDownloadLinks = windowsPackages.get(1).getArchitectures().get(0).getDownloadLinks(); assertThat(standardDownloadLinks.size(), equalTo(1)); assertThat(standardDownloadLinks.get(0).getOs(), equalTo("windows")); assertThat( standardDownloadLinks.get(0).getUrl(), equalTo( "http://eclipseXmlDownload.springsource.com/release/ECLIPSE/kepler/R/eclipse-standard-kepler-R-win32.zip")); assertThat(javaEEDownloadLinks.size(), equalTo(1)); assertThat(javaEEDownloadLinks.get(0).getOs(), equalTo("windows")); assertThat( javaEEDownloadLinks.get(0).getUrl(), equalTo( "http://eclipseXmlDownload.springsource.com/release/ECLIPSE/kepler/R/eclipse-jee-kepler-R-win32.zip")); }
@Test public void addsAPlatform() throws Exception { assertThat(eclipseDownloads.getPlatforms().size(), equalTo(1)); assertThat(eclipseDownloads.getPlatforms().get("windows").getName(), equalTo("Windows")); }