-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: or-1976 remove dots and accents for publiek zoek
- Loading branch information
1 parent
4daee6d
commit 243b2f2
Showing
6 changed files
with
173 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
test/AssociationRegistry.Test.Public.Api/When_Searching/With_Accents_Not_Matching.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace AssociationRegistry.Test.Public.Api.When_Searching; | ||
|
||
using Fixtures; | ||
using Fixtures.GivenEvents; | ||
using Fixtures.GivenEvents.Scenarios; | ||
using FluentAssertions; | ||
using templates; | ||
using Test.Framework; | ||
using Xunit; | ||
using Xunit.Categories; | ||
|
||
[Collection(nameof(PublicApiCollection))] | ||
[Category("PublicApi")] | ||
[IntegrationTest] | ||
public class With_Accents_Not_Matching | ||
{ | ||
private readonly PublicApiClient _publicApiClient; | ||
private readonly V020_Vereniging20ForSearchScenario _scenario; | ||
private readonly string _query = "nôôït"; | ||
|
||
public With_Accents_Not_Matching(GivenEventsFixture fixture) | ||
{ | ||
_publicApiClient = fixture.PublicApiClient; | ||
_scenario = fixture.V020Vereniging20ForSearchScenario; | ||
} | ||
|
||
[Fact] | ||
public async Task Then_we_get_a_successful_response() | ||
=> (await _publicApiClient.Search(_query)).Should().BeSuccessful(); | ||
|
||
[Fact] | ||
public async Task? Then_we_retrieve_one_vereniging_matching_the_name_searched() | ||
{ | ||
var response = await _publicApiClient.Search(_query); | ||
var content = await response.Content.ReadAsStringAsync(); | ||
|
||
var goldenMaster = | ||
new ZoekVerenigingenResponseTemplate() | ||
.FromQuery(_query) | ||
.WithVereniging( | ||
v => v | ||
.FromEvent(_scenario.FeitelijkeVerenigingWerdGeregistreerd) | ||
); | ||
|
||
content.Should().BeEquivalentJson(goldenMaster); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
test/AssociationRegistry.Test.Public.Api/When_Searching/With_Dot_Not_Matching.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace AssociationRegistry.Test.Public.Api.When_Searching; | ||
|
||
using Fixtures; | ||
using Fixtures.GivenEvents; | ||
using Fixtures.GivenEvents.Scenarios; | ||
using FluentAssertions; | ||
using templates; | ||
using Test.Framework; | ||
using Xunit; | ||
using Xunit.Categories; | ||
|
||
[Collection(nameof(PublicApiCollection))] | ||
[Category("PublicApi")] | ||
[IntegrationTest] | ||
public class With_Dot_Not_Matching | ||
{ | ||
private readonly PublicApiClient _publicApiClient; | ||
private readonly V019_Vereniging19ForSearchScenario _scenario; | ||
private readonly string _query = "N.A.S.A."; | ||
|
||
public With_Dot_Not_Matching(GivenEventsFixture fixture) | ||
{ | ||
_publicApiClient = fixture.PublicApiClient; | ||
_scenario = fixture.V019Vereniging19ForSearchScenario; | ||
} | ||
|
||
[Fact] | ||
public async Task Then_we_get_a_successful_response() | ||
=> (await _publicApiClient.Search(_query)).Should().BeSuccessful(); | ||
|
||
[Fact] | ||
public async Task? Then_we_retrieve_one_vereniging_matching_the_name_searched() | ||
{ | ||
var response = await _publicApiClient.Search(_query); | ||
var content = await response.Content.ReadAsStringAsync(); | ||
|
||
var goldenMaster = | ||
new ZoekVerenigingenResponseTemplate() | ||
.FromQuery(_query) | ||
.WithVereniging( | ||
v => v | ||
.FromEvent(_scenario.FeitelijkeVerenigingWerdGeregistreerd) | ||
); | ||
|
||
content.Should().BeEquivalentJson(goldenMaster); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
test/AssociationRegistry.Test.Public.Api/When_Searching/With_Functiewoorden.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace AssociationRegistry.Test.Public.Api.When_Searching; | ||
|
||
using Fixtures; | ||
using Fixtures.GivenEvents; | ||
using Fixtures.GivenEvents.Scenarios; | ||
using FluentAssertions; | ||
using templates; | ||
using Test.Framework; | ||
using Xunit; | ||
using Xunit.Categories; | ||
|
||
[Collection(nameof(PublicApiCollection))] | ||
[Category("PublicApi")] | ||
[IntegrationTest] | ||
public class With_Functiewoorden | ||
{ | ||
private readonly PublicApiClient _publicApiClient; | ||
private readonly V019_Vereniging19ForSearchScenario _scenario; | ||
private readonly string _query = "de het Auto"; | ||
|
||
public With_Functiewoorden(GivenEventsFixture fixture) | ||
{ | ||
_publicApiClient = fixture.PublicApiClient; | ||
_scenario = fixture.V019Vereniging19ForSearchScenario; | ||
} | ||
|
||
[Fact] | ||
public async Task Then_we_get_a_successful_response() | ||
=> (await _publicApiClient.Search(_query)).Should().BeSuccessful(); | ||
|
||
[Fact] | ||
public async Task? Then_we_retrieve_one_vereniging_matching_the_name_searched() | ||
{ | ||
var response = await _publicApiClient.Search(_query); | ||
var content = await response.Content.ReadAsStringAsync(); | ||
|
||
var goldenMaster = | ||
new ZoekVerenigingenResponseTemplate() | ||
.FromQuery(_query) | ||
.WithVereniging( | ||
v => v | ||
.FromEvent(_scenario.FeitelijkeVerenigingWerdGeregistreerd) | ||
); | ||
|
||
content.Should().BeEquivalentJson(goldenMaster); | ||
} | ||
} |