-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: extract common code to BaseStepDefinitions file * feat: add forIdentity field * fix: windows add_migration command not working * feat: personalized tokens support for GET /Tokens * chore: fix formatting * fix: Backbone.Modules.Tokens.Application.Tokens.Commands.CreateToken.CreateTokenCommand was missing required properties, including the following: forIdentity * feat: add sql server migrations * fix: CreateTokenCommand was missing required properties, including the following: forIdentity * chore: fix formatting * Update Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/Features/Tokens/GET.feature Co-authored-by: Nikola Dmitrasinovic <[email protected]> * chore: code review changes * chore: update other script files for windows * chore: review changes * test: Token.CanBeCollectedBy * feat: remove conditional statement * fix: remove null suppressing * chore: rename field * chore: rename input param * chore: rename input param * chore: rename var * chore: remove unnecessary null check * chore: renema param * fix: use TestDataGenerator to get identity address * feat: extract method * refactor: improve assertion * refactor: improve code structure * refactor: improve code structure * fix: remove imput param * test: add integration test * fix: filter tokens by owner * fix: integration test * feat: remove FindAllOfOwner() * feat: add ForIdentity prop to DTO * chore: fix typo * refactor: improve code structure of TokensRepository * refactor: improve Find() of TokensRepository * Merge branch 'main' into NMSHDB-180-personalized-tokens * feat: introduce validation for ForIdentity prop * chore: remove blank lines * test: really small readability improvement * fix: validation * test: improve unit test for expression * chore: remove unnecessary check * test: add for create token validator * chore: fix formatting issues * Update Modules/Tokens/test/Tokens.Application.Tests/Tests/Tokens/CreateToken/ValidatorTests.cs Co-authored-by: Timo Notheisen <[email protected]> * format: improve crete token test structure * refactor: improve code structure of ValidatorTests * chore: rename param * chore: fix formatting issues --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Nikola Dmitrasinovic <[email protected]> Co-authored-by: Nikola Dmitrasinovic <[email protected]> Co-authored-by: Timo Notheisen <[email protected]> Co-authored-by: Timo Notheisen <[email protected]>
- Loading branch information
1 parent
8498a97
commit 715afeb
Showing
29 changed files
with
591 additions
and
126 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
39 changes: 39 additions & 0 deletions
39
...ons/ConsumerApi/test/ConsumerApi.Tests.Integration/StepDefinitions/BaseStepDefinitions.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,39 @@ | ||
using Backbone.ConsumerApi.Sdk; | ||
using Backbone.ConsumerApi.Sdk.Authentication; | ||
using Backbone.ConsumerApi.Tests.Integration.Configuration; | ||
using Backbone.ConsumerApi.Tests.Integration.Support; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Backbone.ConsumerApi.Tests.Integration.StepDefinitions; | ||
|
||
internal class BaseStepDefinitions | ||
{ | ||
internal readonly Dictionary<string, Client> Identities = new(); | ||
internal readonly HttpClient HttpClient; | ||
internal readonly ClientCredentials ClientCredentials; | ||
|
||
public BaseStepDefinitions(HttpClientFactory factory, IOptions<HttpConfiguration> httpConfiguration) | ||
{ | ||
HttpClient = factory.CreateClient(); | ||
ClientCredentials = new ClientCredentials(httpConfiguration.Value.ClientCredentials.ClientId, httpConfiguration.Value.ClientCredentials.ClientSecret); | ||
} | ||
|
||
#region Given | ||
|
||
[Given(@"Identities (i[a-zA-Z0-9]*) and (i[a-zA-Z0-9]*)")] | ||
public void Given2Identities(string identity1Name, string identity2Name) | ||
{ | ||
Identities[identity1Name] = Client.CreateForNewIdentity(HttpClient, ClientCredentials, Constants.DEVICE_PASSWORD).Result; | ||
Identities[identity2Name] = Client.CreateForNewIdentity(HttpClient, ClientCredentials, Constants.DEVICE_PASSWORD).Result; | ||
} | ||
|
||
[Given(@"Identities (i[a-zA-Z0-9]*), (i[a-zA-Z0-9]*) and (i[a-zA-Z0-9]*)")] | ||
public void Given3Identities(string identity1Name, string identity2Name, string identity3Name) | ||
{ | ||
Identities[identity1Name] = Client.CreateForNewIdentity(HttpClient, ClientCredentials, Constants.DEVICE_PASSWORD).Result; | ||
Identities[identity2Name] = Client.CreateForNewIdentity(HttpClient, ClientCredentials, Constants.DEVICE_PASSWORD).Result; | ||
Identities[identity3Name] = Client.CreateForNewIdentity(HttpClient, ClientCredentials, Constants.DEVICE_PASSWORD).Result; | ||
} | ||
|
||
#endregion | ||
} |
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
Oops, something went wrong.