public async Task FindPackagesByIdForPredefinedPackage() { string packageId = "PostSharp"; string url = UrlHelper.V2FeedRootUrl + @"/FindPackagesById()?id='" + packageId + "'"; string expectedText = @"<id>" + UrlHelper.V2FeedRootUrl + "Packages(Id='" + packageId; var odataHelper = new ODataHelper(); var containsResponseText = await odataHelper.ContainsResponseText(url, expectedText); Assert.IsTrue(containsResponseText); }
public async Task FindPackagesBySpecificIdAndVersion() { string packageId = "Microsoft.Web.Infrastructure"; string version = "1.0.0.0"; string url = UrlHelper.V2FeedRootUrl + @"Packages(Id='" + packageId + "',Version='" + version + "')"; string expectedText = @"<id>" + UrlHelper.V2FeedRootUrl + "Packages(Id='" + packageId + "',Version='" + version + "')</id>"; var odataHelper = new ODataHelper(); var containsResponseText = await odataHelper.ContainsResponseText(url, expectedText); Assert.IsTrue(containsResponseText); }
public async Task ApiV2BaseUrlTest() { string expectedText = @"<atom:title>Packages</atom:title>"; var odataHelper = new ODataHelper(); bool containsResponseText = await odataHelper.ContainsResponseText(UrlHelper.V2FeedRootUrl, expectedText); Assert.IsTrue(containsResponseText); }
public async Task ApiV2MetadataTest() { string expectedText = @"V2FeedPackage"; var odataHelper = new ODataHelper(); bool containsResponseText = await odataHelper.ContainsResponseText(UrlHelper.V2FeedRootUrl + @"$metadata", expectedText); Assert.IsTrue(containsResponseText); }
public async Task Top30PackagesFeedTest() { string url = UrlHelper.V2FeedRootUrl + @"/Search()?$filter=IsAbsoluteLatestVersion&$orderby=DownloadCount%20desc,Id&$skip=0&$top=30&searchTerm=''&targetFramework='net45'&includePrerelease=true"; var odataHelper = new ODataHelper(); bool containsResponseText = await odataHelper.ContainsResponseText(url, "jQuery"); Assert.IsTrue(containsResponseText); }
public async Task StatsTotalTest() { string url = UrlHelper.BaseUrl + @"/stats/totals"; var odataHelper = new ODataHelper(); var containsResponseText = await odataHelper.ContainsResponseText(url, @"Downloads"); Assert.IsTrue(containsResponseText); }