Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaimoiseanu committed Mar 7, 2024
1 parent 99dbd64 commit 9914b27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions MangoPay.SDK.Tests/ApiConversionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace MangoPay.SDK.Tests
{
[TestFixture]
public class ApiConversionsTest: BaseTest
public class ApiConversionsTest : BaseTest
{
[Test]
public async Task Test_GetConversionRate()
{
var conversionRate = await Api.Conversions.GetConversionRate("EUR", "GBP");

Assert.IsNotNull(conversionRate);
Assert.IsNotNull(conversionRate.ClientRate);
Assert.IsNotNull(conversionRate.MarketRate);
Expand All @@ -25,7 +25,7 @@ public async Task Test_GetConversionRate()
public async Task Test_CreateInstantConversion()
{
var createdInstantConversion = await CreateInstantConversion();

Assert.IsNotNull(createdInstantConversion);
Assert.IsNotNull(createdInstantConversion.CreditedFunds.Amount);
Assert.IsNotNull(createdInstantConversion.DebitedFunds.Amount);
Expand All @@ -38,7 +38,7 @@ public async Task Test_GetInstantConversion()
{
var createdInstantConversion = await CreateInstantConversion();
var returnedInstantConversion = await Api.Conversions.GetInstantConversion(createdInstantConversion.Id);

Assert.IsNotNull(returnedInstantConversion);
Assert.IsNotNull(returnedInstantConversion.CreditedFunds.Amount);
Assert.IsNotNull(returnedInstantConversion.DebitedFunds.Amount);
Expand All @@ -50,7 +50,7 @@ public async Task Test_GetInstantConversion()
public async Task Test_CreateConversionQuote()
{
var createdConversionQuote = await CreateConversionQuote();

Assert.IsNotNull(createdConversionQuote);
Assert.IsNotNull(createdConversionQuote.CreditedFunds);
Assert.IsNotNull(createdConversionQuote.DebitedFunds);
Expand All @@ -63,7 +63,7 @@ public async Task Test_GetConversionQuote()
{
var createdConversionQuote = await CreateConversionQuote();
var returnedConversionQuote = await Api.Conversions.GetConversionQuote(createdConversionQuote.Id);

Assert.IsNotNull(returnedConversionQuote);
Assert.IsNotNull(returnedConversionQuote.CreditedFunds);
Assert.IsNotNull(returnedConversionQuote.DebitedFunds);
Expand All @@ -76,9 +76,9 @@ public async Task Test_CreateQuotedConversion()
{
var john = await GetJohn();
var wallet =
new WalletPostDTO(new List<string> {john.Id}, "WALLET IN GBP WITH MONEY", CurrencyIso.GBP);
new WalletPostDTO(new List<string> { john.Id }, "WALLET IN GBP WITH MONEY", CurrencyIso.GBP);
var creditedWallet = await Api.Wallets.CreateAsync(wallet);

var debitedWallet = await GetJohnsWalletWithMoney();

var quote = await CreateConversionQuote();
Expand All @@ -91,20 +91,19 @@ public async Task Test_CreateQuotedConversion()
);

var quotedConversion = await this.Api.Conversions.CreateQuotedConversion(quotedConversionPostDTO);

Assert.IsNotNull(quotedConversion);
Assert.AreEqual(TransactionStatus.SUCCEEDED, quotedConversion.Status);
Assert.AreEqual(TransactionNature.REGULAR, quotedConversion.Nature);

}

private async Task<ConversionDTO> CreateInstantConversion()
private async Task<ConversionDTO> CreateInstantConversion()
{
var john = await GetJohn();
var wallet =
new WalletPostDTO(new List<string> {john.Id}, "WALLET IN GBP WITH MONEY", CurrencyIso.GBP);
new WalletPostDTO(new List<string> { john.Id }, "WALLET IN GBP WITH MONEY", CurrencyIso.GBP);
var creditedWallet = await Api.Wallets.CreateAsync(wallet);

var debitedWallet = await GetJohnsWalletWithMoney();

var instantConversion = new ConversionPostDTO(
Expand All @@ -113,6 +112,7 @@ private async Task<ConversionDTO> CreateInstantConversion()
creditedWallet.Id,
new Money { Amount = 30, Currency = CurrencyIso.EUR },
new Money { Currency = CurrencyIso.GBP },
new Money { Amount = 10, Currency = CurrencyIso.GBP },
"create instant conversion"
);

Expand Down
2 changes: 1 addition & 1 deletion MangoPay.SDK/Core/APIs/ApiOAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public async Task<OAuthTokenDTO> CreateTokenAsync(CreateOAuthTokenPostDTO entity
restTool.AddRequestHttpHeader(Constants.CONTENT_TYPE, Constants.APPLICATION_X_WWW_FORM_URLENCODED);

return await restTool.RequestAsync<OAuthTokenDTO, CreateOAuthTokenPostDTO>(endPoint, null, entity);
}
}
}
}

0 comments on commit 9914b27

Please sign in to comment.