Skip to content

Commit

Permalink
chore: cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil91 committed Sep 19, 2024
1 parent e66fff6 commit a31eef5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ public record ServiceAccountConnectorOfferData(
[property: JsonPropertyName("offer")] OfferResponseData? Offer,
[property: JsonPropertyName("LastEditorName")] string? LastName,
[property: JsonPropertyName("LastEditorCompanyName")] string? CompanyName

);
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public async Task GetOwnCompanyServiceAccountDetailsAsync_WithValidInputAndDimCo
[Fact]
public async Task GetOwnCompanyServiceAccountDetailsAsync_WithValidUserTypeInternal_AuthenticationUrl()
{
// Arrange
// Arrange
SetupGetOwnComapnyServiceAccountInternalType();
var sut = new ServiceAccountBusinessLogic(_provisioningManager, _portalRepositories, _options, null!, _identityService, _serviceAccountManagement);

Expand Down Expand Up @@ -839,8 +839,8 @@ private void SetupUpdateOwnCompanyServiceAccountDetails()

private void SetupGetOwnCompanyServiceAccount()
{
var cryptoConfig = _options.Value.EncryptionConfigs.Single(x => x.Index == _options.Value.EncryptionConfigIndex);
var (secret, initializationVector) = CryptoHelper.Encrypt("test", Convert.FromHexString(cryptoConfig.EncryptionKey), cryptoConfig.CipherMode, cryptoConfig.PaddingMode);
var cryptoHelper = _options.Value.EncryptionConfigs.GetCryptoHelper(_options.Value.EncryptionConfigIndex);
var (secret, initializationVector) = cryptoHelper.Encrypt("test");

var dimServiceAccountData = new DimServiceAccountData("https://example.org/auth", secret, initializationVector, _options.Value.EncryptionConfigIndex);
var dataWithDim = _fixture.Build<CompanyServiceAccountDetailedData>()
Expand Down Expand Up @@ -872,8 +872,8 @@ private void SetupGetOwnComapnyServiceAccountInternalType()

private void SetupGetOwnComapnyServiceAccountExternalType()
{
var cryptoConfig = _options.Value.EncryptionConfigs.Single(x => x.Index == _options.Value.EncryptionConfigIndex);
var (secret, initializationVector) = CryptoHelper.Encrypt("test", Convert.FromHexString(cryptoConfig.EncryptionKey), cryptoConfig.CipherMode, cryptoConfig.PaddingMode);
var cryptoHelper = _options.Value.EncryptionConfigs.GetCryptoHelper(_options.Value.EncryptionConfigIndex);
var (secret, initializationVector) = cryptoHelper.Encrypt("test");

var dimServiceAccountData = new DimServiceAccountData("https://test.org/auth", secret, initializationVector, _options.Value.EncryptionConfigIndex);

Expand All @@ -885,7 +885,6 @@ private void SetupGetOwnComapnyServiceAccountExternalType()

A.CallTo(() => _serviceAccountRepository.GetOwnCompanyServiceAccountDetailedDataUntrackedAsync(ValidServiceAccountId, ValidCompanyId))
.Returns(externalData);

}

private void SetupDeleteOwnCompanyServiceAccount(Connector? connector = null, Identity? identity = null, Guid? processId = null)
Expand Down

0 comments on commit a31eef5

Please sign in to comment.