public void LocationSearchUrl() { var savedSearch = new SavedSearchBuilder().WithinDistance(10).WithLocation("Coventry").Build(); var searchUrl = savedSearch.SearchUrl(); searchUrl.Should().NotBeNull(); searchUrl.Value.Should().Be("/apprenticeships?SearchMode=Keyword&Location=Coventry&Hash=0&WithinDistance=10&ApprenticeshipLevel=All&SearchField=All&DisplaySubCategory=True&DisplayDescription=True&DisplayDistance=True&DisplayClosingDate=True&DisplayStartDate=True&DisplayApprenticeshipLevel=False&DisplayWage=False&SearchAction=Search&LocationType=NonNational"); }
public void SectorSearchUrl() { var savedSearch = new SavedSearchBuilder().WithSearchMode(ApprenticeshipSearchMode.Category).WithCategory("CST").WithinDistance(0).Build(); var searchUrl = savedSearch.SearchUrl(); searchUrl.Should().NotBeNull(); searchUrl.Value.Should().Be("/apprenticeships?SearchMode=Category&Hash=0&WithinDistance=0&ApprenticeshipLevel=All&Category=CST&SearchField=All&DisplaySubCategory=True&DisplayDescription=True&DisplayDistance=True&DisplayClosingDate=True&DisplayStartDate=True&DisplayApprenticeshipLevel=False&DisplayWage=False&SearchAction=Search&LocationType=NonNational"); }
public void SectorFrameworkSearchUrl() { var savedSearch = new SavedSearchBuilder().WithSearchMode(ApprenticeshipSearchMode.Category).WithLocation("CV1 2WT").WithCategory("CST").WithSubCategories(new[] { "522", "532" }).WithinDistance(10).Build(); var searchUrl = savedSearch.SearchUrl(); searchUrl.Should().NotBeNull(); searchUrl.Value.Should().Be("/apprenticeships?SearchMode=Category&Location=CV1+2WT&Hash=0&WithinDistance=10&ApprenticeshipLevel=All&Category=CST&SearchField=All&DisplaySubCategory=True&DisplayDescription=True&DisplayDistance=True&DisplayClosingDate=True&DisplayStartDate=True&DisplayApprenticeshipLevel=False&DisplayWage=False&SearchAction=Search&LocationType=NonNational&SubCategories=522&SubCategories=532"); }
public void EnglandSearchUrl() { var savedSearch = new SavedSearchBuilder().WithKeywords("engineering").WithinDistance(0).WithLocation("CV1 2WT").Build(); var searchUrl = savedSearch.SearchUrl(); searchUrl.Should().NotBeNull(); searchUrl.Value.Should().Be("/apprenticeships?SearchMode=Keyword&Location=CV1+2WT&Hash=0&Keywords=engineering&WithinDistance=0&ApprenticeshipLevel=All&SearchField=All&DisplaySubCategory=True&DisplayDescription=True&DisplayDistance=True&DisplayClosingDate=True&DisplayStartDate=True&DisplayApprenticeshipLevel=False&DisplayWage=False&SearchAction=Search&LocationType=NonNational"); }
public void LocationLatLongSearchUrl() { var savedSearch = new SavedSearchBuilder().WithinDistance(10).WithLocation("Coventry").WithLatLong(1.1d, 2.1d).Build(); var searchUrl = savedSearch.SearchUrl(); searchUrl.Should().NotBeNull(); searchUrl.Value.Should().BeOneOf( "/apprenticeships?SearchMode=Keyword&Location=Coventry&Longitude=2.1&Latitude=1.1&Hash=-1434161545&WithinDistance=10&ApprenticeshipLevel=All&SearchField=All&DisplaySubCategory=True&DisplayDescription=True&DisplayDistance=True&DisplayClosingDate=True&DisplayStartDate=True&DisplayApprenticeshipLevel=False&DisplayWage=False&SearchAction=Search&LocationType=NonNational", "/apprenticeships?SearchMode=Keyword&Location=Coventry&Longitude=2.1&Latitude=1.1&Hash=-94534883&WithinDistance=10&ApprenticeshipLevel=All&SearchField=All&DisplaySubCategory=True&DisplayDescription=True&DisplayDistance=True&DisplayClosingDate=True&DisplayStartDate=True&DisplayApprenticeshipLevel=False&DisplayWage=False&SearchAction=Search&LocationType=NonNational"); }