-
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.
Merge pull request #5 from HannaAndreevna/4-extend-the-list-of-suppor…
…ted-currencies 4 extend the list of supported currencies
- Loading branch information
Showing
5 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/MAVN.Service.PayrexxIntegration.Domain/Enums/IntegrationSupportedCurrency.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,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MAVN.Service.PayrexxIntegration.Domain.Enums | ||
{ | ||
public enum IntegrationSupportedCurrency | ||
{ | ||
CHF, | ||
EUR, | ||
GBP, | ||
USD, | ||
RUR | ||
} | ||
} |
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
31 changes: 31 additions & 0 deletions
31
tests/MAVN.Service.PayrexxIntegration.Tests/PartnerIntegrationPropertiesServiceTest.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,31 @@ | ||
using System; | ||
using MAVN.Service.CustomerProfile.Client; | ||
using MAVN.Service.PayrexxIntegration.Domain.Enums; | ||
using MAVN.Service.PayrexxIntegration.DomainServices; | ||
using Moq; | ||
using Xunit; | ||
|
||
namespace MAVN.Service.PayrexxIntegration.Tests | ||
{ | ||
public class PartnerIntegrationPropertiesServiceTest | ||
{ | ||
|
||
private readonly Mock<ICustomerProfileClient> _customerProfileClient = new Mock<ICustomerProfileClient>(); | ||
private readonly string _fakeApiBaseUrl = Guid.NewGuid().ToString(); | ||
|
||
[Fact] | ||
public async void CheckIntegrationSupportedCurrency_ReturnsNotEmptyStringList() | ||
{ | ||
var expectedCount = Enum.GetNames(typeof(IntegrationSupportedCurrency)).Length; | ||
|
||
var result = await CreateSutInstance().GetIntegrationCurrency(); | ||
|
||
Assert.Equal(expectedCount, result.Count); | ||
} | ||
|
||
private PartnerIntegrationPropertiesService CreateSutInstance() | ||
{ | ||
return new PartnerIntegrationPropertiesService(_customerProfileClient.Object, _fakeApiBaseUrl); | ||
} | ||
} | ||
} |