public void Test_Search_FilterValidUrls_WithLimit() { string param = "limit=20"; SearchRequestItem item = new SearchRequestItem("1", "heart", "movie", param); item.FilterValidUrls(); Assert.AreEqual(item.Urls.Count, 1); Assert.AreEqual(item.Urls[0], "search/movie/heart/results?page=0&sort="); }
public void Test_Search_FilterValidUrls_WithLimitAndOffset3() { string param = "offset=61&limit=20"; SearchRequestItem item = new SearchRequestItem("1", "heart", "tvshow", param); item.FilterValidUrls(); Assert.AreEqual(item.Urls.Count, 1); Assert.AreEqual(item.Urls[0], "search/tv/heart/results?page=3&sort="); }
public void Test_Search_FilterValidUrls_WithLimitAndOffset() { // limit max is 20 string param = "offset=21&limit=21"; SearchRequestItem item = new SearchRequestItem("1", "heart", "movie", param); item.FilterValidUrls(); Assert.AreEqual(item.Urls.Count, 1); Assert.AreEqual(item.Urls[0], "search/movie/heart/results?page=1&sort="); }
public void Test_Search_FilterValidUrls_WithLimit2() { // limit max is 20 string param = "sort=score&limit=41"; SearchRequestItem item = new SearchRequestItem("1", "heart", "tvshow", param); item.FilterValidUrls(); Assert.AreEqual(item.Urls.Count, 1); Assert.AreEqual(item.Urls[0], "search/tv/heart/results?page=0&sort=score"); }
public void Test_Search_FilterValidUrls_WithOffset2() { string param = "sort=relevancy&offset=59"; SearchRequestItem item = new SearchRequestItem("1", "heart", "movie", param); item.FilterValidUrls(); Assert.AreEqual(item.Urls.Count, 2); Assert.AreEqual(item.Urls[0], "search/movie/heart/results?page=2&sort=relevancy"); Assert.AreEqual(item.Urls[1], "search/movie/heart/results?page=3&sort=relevancy"); }
public void Test_Search_FilterValidUrls_WithLimitAndOffset2() { // limit max is 20 string param = "offset=20&limit=56"; SearchRequestItem item = new SearchRequestItem("1", "heart", "tvshow", param); item.FilterValidUrls(); Assert.AreEqual(item.Urls.Count, 2); Assert.AreEqual(item.Urls[0], "search/tv/heart/results?page=0&sort="); Assert.AreEqual(item.Urls[1], "search/tv/heart/results?page=1&sort="); }