public async Task ExecuteReturns30ResultsForNullQuery() { var query = new AutoCompleteServicePackageIdsQuery(GetConfiguration()); var result = await query.Execute(null, false); Assert.True(result.Count() == 30); }
public async Task ExecuteReturnsResultsForSpecificQuery() { var query = new AutoCompleteServicePackageIdsQuery(GetConfiguration()); var result = await query.Execute("jquery", false); Assert.Contains("jquery", result, StringComparer.OrdinalIgnoreCase); }
public void PackageIdQueryBuildsCorrectQueryString(bool includePrerelease, string semVerLevel, string expectedQueryString) { // Arrange var query = new AutoCompleteServicePackageIdsQuery(GetConfiguration()); // Act var actualQueryString = query.BuildQueryString("take=30&q=Json", includePrerelease, semVerLevel); // Assert Assert.Equal(expectedQueryString, actualQueryString); }