Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTTY committed Aug 16, 2024
1 parent 25fee1c commit 5be0362
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public async Task ExecuteRequestWithUnauthorizedToken()
Assert.Multiple(() =>
{
AssertionHelpers.AssertNordigenApiResponseIsUnsuccessful(response, HttpStatusCode.Unauthorized);
AssertionHelpers.AssertBasicResponseMatchesExpectations(response.Error, "Invalid token",
"Token is invalid or expired");
AssertionHelpers.AssertBasicResponseMatchesExpectations(response.Error, "Authentication failed",
"No active account found with the given credentials");
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task GetTransactions()
{
var matchesAll = true;
matchesAll &= t.BankTransactionCode == "PMNT";
matchesAll &= t.DebtorAccount?.Iban == "GL2010440000010445";
matchesAll &= t.DebtorAccount?.Iban == "GL8240830000040838";
matchesAll &= t.DebtorName == "MON MOTHMA";
matchesAll &= t.RemittanceInformationUnstructured ==
"For the support of Restoration of the Republic foundation";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,7 @@ await _apiClient.AgreementsEndpoint.CreateAgreement(null!, uint.MaxValue, uint.M
Assert.That(response.Error!.InstitutionIdError!.Summary, Is.EqualTo("This field is required."));
Assert.That(response.Error!.InstitutionIdError!.Detail, Is.EqualTo("This field is required."));
Assert.That(response.Error!.AccessValidForDaysError!.Summary,
Is.EqualTo("Incorrect access_valid_for_days"));
Assert.That(response.Error!.AccessValidForDaysError!.Detail,
Is.EqualTo("access_valid_for_days must be > 0 and <= 180"));
Assert.That(response.Error!.AccessValidForDaysError!, Is.Null);
Assert.That(response.Error!.AgreementError, Is.Null);
Assert.That(response.Error!.AccessScopeError, Is.Null);
Assert.That(response.Error!.MaxHistoricalDaysError, Is.Null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ await _apiClient.RequisitionsEndpoint.CreateRequisition("", redirect, agreementI
{
AssertionHelpers.AssertNordigenApiResponseIsUnsuccessful(response, HttpStatusCode.BadRequest);
Assert.That(response.Error!.AccountSelectionError!.Summary, Is.EqualTo("Account selection not supported"));
Assert.That(response.Error!.AccountSelectionError!.Detail,
Is.EqualTo("Account selection not supported for "));
Assert.That(response.Error!.AgreementError!.Summary, Is.EqualTo("Incorrect Institution ID "));
Assert.That(response.Error!.AgreementError!.Detail,
Is.EqualTo(
Expand All @@ -204,11 +200,6 @@ await _apiClient.RequisitionsEndpoint.CreateRequisition("", redirect, agreementI
Assert.That(response.Error!.ReferenceError!.Summary, Is.EqualTo("This field may not be blank."));
Assert.That(response.Error!.ReferenceError!.Detail, Is.EqualTo("This field may not be blank."));
Assert.That(response.Error!.SocialSecurityNumberError!.Summary,
Is.EqualTo("SSN verification not supported"));
Assert.That(response.Error!.SocialSecurityNumberError!.Detail,
Is.EqualTo("SSN verification not supported for "));
Assert.That(response.Error!.UserLanguageError!.Summary,
Is.EqualTo("Provided user_language is invalid or not supported"));
Assert.That(response.Error!.UserLanguageError!.Detail,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
<PackageTags>Nordigen; API; client</PackageTags>
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/release-notes.txt"))</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>9.0.0</Version>
<Version>10.0.0</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<UserSecretsId>12f53312-dcef-47c5-bc2e-0ce6f74609a6</UserSecretsId>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 5be0362

Please sign in to comment.