ContainsResponseText() 공개 메소드

public ContainsResponseText ( string url ) : Task
url string
리턴 Task
예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
 public async Task ApiV2MetadataTest()
 {
     string expectedText = @"V2FeedPackage";
     var odataHelper = new ODataHelper();
     bool containsResponseText = await odataHelper.ContainsResponseText(UrlHelper.V2FeedRootUrl + @"$metadata", expectedText);
     Assert.IsTrue(containsResponseText);
 }
예제 #5
0
 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);
 }
예제 #6
0
 public async Task StatsTotalTest()
 {
     string url = UrlHelper.BaseUrl + @"/stats/totals";
     var odataHelper = new ODataHelper();
     var containsResponseText = await odataHelper.ContainsResponseText(url, @"Downloads");
     Assert.IsTrue(containsResponseText);
 }