package es.arcadiaconsulting.appstoresstats.ios.io;

import java.util.List;

import es.arcadiaconsulting.appstoresstats.common.Rating;
import junit.framework.TestCase;

public class RSSHelperTest extends TestCase{

	public void testGetItunesURL(){
		assertEquals("https://itunes.apple.com/es/app/iredes-2015/id604031647?mt=8&uo=2",RSSHelper.getItunesURL("604031647"));
		assertNull(RSSHelper.getItunesURL("invalid"));
	}
	
	public void testGetItunesRating(){
		List<Rating> rating = RSSHelper.getItunesRating("604031647");
		assertEquals("1.2.0",((Rating)rating.get(0)).getAppVersion());
		assertEquals("Genial app",((Rating)rating.get(0)).getOpinion());
		assertEquals(5,((Rating)rating.get(0)).getRate());
		
	}
	
}

@@ -299,17 +299,17 @@
 edes-201
-5
+6
 /id60403

Fix #14 - RSSHelperTest for iOS module fails update App name for the test from iReded 2015 to iRedes 2016