diff --git a/CHANGELOG.md b/CHANGELOG.md index 6077498..c0821a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +### Unreleased + +- Added SearchService.SearchByPostCodeOrSize, a method to search for both parameters at the same time [#31](https://github.com/pyrocumulus/pvoutput.net/pull/31) + ## [0.7.0] - 2020-04-08 ### Added diff --git a/src/PVOutput.Net/Modules/SearchService.cs b/src/PVOutput.Net/Modules/SearchService.cs index 7648f7e..5d801bc 100644 --- a/src/PVOutput.Net/Modules/SearchService.cs +++ b/src/PVOutput.Net/Modules/SearchService.cs @@ -72,7 +72,6 @@ public Task> SearchByNameAsync(string return handler.ExecuteArrayRequestAsync(new SearchRequest { SearchQuery = query }, loggingScope, cancellationToken); } - /* /// /// Search for systems that have either a postcode or total size that begins with a value. /// @@ -92,7 +91,7 @@ public Task> SearchByPostcodeOrSizeAs var handler = new RequestHandler(Client); return handler.ExecuteArrayRequestAsync(new SearchRequest { SearchQuery = query }, loggingScope, cancellationToken); - }*/ + } /// /// Search for systems by postcode. diff --git a/tests/PVOutput.Net.Tests/Modules/Search/SearchServiceTests.cs b/tests/PVOutput.Net.Tests/Modules/Search/SearchServiceTests.cs index 3ce1362..2712814 100644 --- a/tests/PVOutput.Net.Tests/Modules/Search/SearchServiceTests.cs +++ b/tests/PVOutput.Net.Tests/Modules/Search/SearchServiceTests.cs @@ -64,11 +64,11 @@ public async Task SearchService_SearchByNameContains_CallsCorrectUri() await TestSpecificSearchQuery(s => s.SearchByNameAsync("name", false), "name"); } - //[Test] - //public async Task SearchService_SearchByPostcodeOrSize_CallsCorrectUri() - //{ - // await TestSpecificSearchQuery(s => s.SearchByPostcodeOrSizeAsync(2500), "2500"); - //} + [Test] + public async Task SearchService_SearchByPostcodeOrSize_CallsCorrectUri() + { + await TestSpecificSearchQuery(s => s.SearchByPostcodeOrSizeAsync(2500), "2500"); + } [Test] public async Task SearchService_SearchByPostcode_CallsCorrectUri()