-
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.
Merge pull request #50 from QuantozTechnology/customer-prop
NXS-6251 : Add new properties and methods to Customer classes
- Loading branch information
Showing
5 changed files
with
154 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -378,6 +378,98 @@ public void CustomerRequestBuilderTests_Build_IsReviewRecommended() | |
}); | ||
} | ||
|
||
[Test] | ||
public void CustomerRequestBuilderTests_Build_PortfolioCode() | ||
{ | ||
var request = new CreateCustomerRequestBuilder( | ||
"MOCK_CUSTOMER", "Trusted", "EUR") | ||
.SetIsBusiness(true) | ||
.SetEmail("[email protected]") | ||
.SetCountry("NL") | ||
.SetStatus(CustomerStatus.ACTIVE) | ||
.SetCompanyName("XYZ") | ||
.SetPortfolioCode("PORTFOLIO") | ||
.Build(); | ||
|
||
Assert.Multiple(() => | ||
{ | ||
Assert.That(request, Is.Not.Null); | ||
Assert.That(request.Email, Is.EqualTo("[email protected]")); | ||
Assert.That(request.CustomerCode, Is.EqualTo("MOCK_CUSTOMER")); | ||
Assert.That(request.TrustLevel, Is.EqualTo("Trusted")); | ||
Assert.That(request.Status, Is.EqualTo("ACTIVE")); | ||
Assert.That(request.CurrencyCode, Is.EqualTo("EUR")); | ||
Assert.That(request.CountryCode, Is.EqualTo(expected: "NL")); | ||
Assert.That(request.CompanyName, Is.EqualTo("XYZ")); | ||
Assert.That(request.PortFolioCode, Is.EqualTo("PORTFOLIO")); | ||
Assert.That(request.IsBusiness, Is.True); | ||
Assert.That(request.BankAccounts, Is.Null); | ||
Assert.That(request.Data, Is.Null); | ||
}); | ||
} | ||
|
||
[Test] | ||
public void CustomerRequestBuilderTests_Build_IsReviewed() | ||
{ | ||
var request = new CreateCustomerRequestBuilder( | ||
"MOCK_CUSTOMER", "Trusted", "EUR") | ||
.SetIsBusiness(true) | ||
.SetEmail("[email protected]") | ||
.SetCountry("NL") | ||
.SetStatus(CustomerStatus.ACTIVE) | ||
.SetCompanyName("XYZ") | ||
.SetIsReviewRecommended(true) | ||
.SetIsReviewed(true) | ||
.Build(); | ||
|
||
Assert.Multiple(() => | ||
{ | ||
Assert.That(request, Is.Not.Null); | ||
Assert.That(request.Email, Is.EqualTo("[email protected]")); | ||
Assert.That(request.CustomerCode, Is.EqualTo("MOCK_CUSTOMER")); | ||
Assert.That(request.TrustLevel, Is.EqualTo("Trusted")); | ||
Assert.That(request.Status, Is.EqualTo("ACTIVE")); | ||
Assert.That(request.CurrencyCode, Is.EqualTo("EUR")); | ||
Assert.That(request.CountryCode, Is.EqualTo(expected: "NL")); | ||
Assert.That(request.CompanyName, Is.EqualTo("XYZ")); | ||
Assert.That(request.IsReviewRecommended, Is.True); | ||
Assert.That(request.IsReviewed, Is.True); | ||
Assert.That(request.IsBusiness, Is.True); | ||
Assert.That(request.BankAccounts, Is.Null); | ||
Assert.That(request.Data, Is.Null); | ||
}); | ||
} | ||
|
||
[Test] | ||
public void CustomerRequestBuilderTests_Build_IsPEP() | ||
{ | ||
var request = new CreateCustomerRequestBuilder( | ||
"MOCK_CUSTOMER", "Trusted", "EUR") | ||
.SetIsBusiness(true) | ||
.SetEmail("[email protected]") | ||
.SetCountry("NL") | ||
.SetStatus(CustomerStatus.ACTIVE) | ||
.SetCompanyName("XYZ") | ||
.SetIsPEP(true) | ||
.Build(); | ||
|
||
Assert.Multiple(() => | ||
{ | ||
Assert.That(request, Is.Not.Null); | ||
Assert.That(request.Email, Is.EqualTo("[email protected]")); | ||
Assert.That(request.CustomerCode, Is.EqualTo("MOCK_CUSTOMER")); | ||
Assert.That(request.TrustLevel, Is.EqualTo("Trusted")); | ||
Assert.That(request.Status, Is.EqualTo("ACTIVE")); | ||
Assert.That(request.CurrencyCode, Is.EqualTo("EUR")); | ||
Assert.That(request.CountryCode, Is.EqualTo(expected: "NL")); | ||
Assert.That(request.CompanyName, Is.EqualTo("XYZ")); | ||
Assert.That(request.IsPEP, Is.True); | ||
Assert.That(request.IsBusiness, Is.True); | ||
Assert.That(request.BankAccounts, Is.Null); | ||
Assert.That(request.Data, Is.Null); | ||
}); | ||
} | ||
|
||
[Test] | ||
public void CustomerRequestBuilderTests_Build_Address_State_ZipCode_City() | ||
{ | ||
|
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
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