public void BuildQueryStringReturnsTheExpectedString(string queryString, bool?includePrerelease, string semVerLevel, string expectedResult) { // Arrange var autocompleteServiceQuery = TestAutocompleteServiceQuery.Instance(_baseAddress, queryString); // Act var result = autocompleteServiceQuery.BuildQueryString(queryString, includePrerelease, semVerLevel); // Assert Assert.Equal(expectedResult, result); }
public async Task ExecuteQueryReturnsTheExpectedString(string queryString, string expectedResult) { // Arrange var autocompleteServiceQuery = TestAutocompleteServiceQuery.Instance(_baseAddress, queryString); // Act var result = await autocompleteServiceQuery.ExecuteQuery(queryString); // Assert Assert.Equal(expectedResult, result); }
public static AutocompleteServiceQuery Instance(Uri baseAddress, string queryString) { var test = new TestAutocompleteServiceQuery(baseAddress, queryString); return(test._instance); }