Skip to content

Commit

Permalink
Add additional verbosity to functional tests for Search()
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenba committed Jul 27, 2016
1 parent c1bc557 commit af53d45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/NuGetGallery.FunctionalTests/ODataFeeds/SearchTest.cs
Expand Up @@ -52,9 +52,11 @@ private async Task SearchFeedAsync(string feedRootUrl, string title)
responseText = await sr.ReadToEndAsync();
}

Assert.True(responseText.Contains(@"<title type=""text"">" + title + @"</title>"), "The expected package title wasn't found in the feed. Feed contents: " + responseText);
Assert.True(responseText.Contains(@"<content type=""application/zip"" src=""" + feedRootUrl + "package/microsoft-web-helpers/"), "The expected package URL wasn't found in the feed. Feed contents: " + responseText);
Assert.False(responseText.Contains(@"jquery"), "The feed contains non-matching package names. Feed contents: " + responseText);
var expectedUrl = feedRootUrl + "package/Microsoft.AspNet.WebHelpers/";

Assert.True(responseText.Contains(@"<title type=""text"">" + title + @"</title>"), "The expected package title '" + title + "' wasn't found in the feed. Feed contents: " + responseText);
Assert.True(responseText.Contains(@"<content type=""application/zip"" src=""" + expectedUrl), "The expected package URL '" + expectedUrl + "' wasn't found in the feed. Feed contents: " + responseText);
Assert.False(responseText.Contains(@"jquery"), "The feed contains non-matching package names. Feed contents: " + responseText);
}
}
}

0 comments on commit af53d45

Please sign in to comment.