Skip to content

Commit f405de3

Browse files
author
Joao Antao
committed
Rename constants following group identifier and PascalCase convention. (#58)
1 parent 17d446c commit f405de3

File tree

5 files changed

+50
-51
lines changed

5 files changed

+50
-51
lines changed

BunqSdk.Tests/Model/Generated/Endpoint/MonetaryAccountBankTest.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public class MonetaryAccountBankTest : BunqSdkTestBase
1414
/// <summary>
1515
/// Config values
1616
/// </summary>
17-
private const string Status = "CANCELLED";
18-
private const string SubStatus = "REDEMPTION_VOLUNTARY";
19-
private const string Reason = "OTHER";
20-
private const string ReasonDescription = "Because this is a test";
21-
private const string Currency = "EUR";
22-
private const string Description = "Test C# monetary account";
17+
private const string MonetaryAccountBankStatus = "CANCELLED";
18+
private const string MonetaryAccountBankSubStatus = "REDEMPTION_VOLUNTARY";
19+
private const string MonetaryAccountBankReason = "OTHER";
20+
private const string MonetaryAccountBankReasonDescription = "Because this is a test";
21+
private const string MonetaryAccountBankCurrency = "EUR";
22+
private const string MonetaryAccountBankDescription = "Test C# monetary account";
2323

2424
private static readonly int UserId = Config.GetUserId();
2525

@@ -36,8 +36,8 @@ public void TestCreationNewMonetaryAccount()
3636
{
3737
var requestMap = new Dictionary<string, object>
3838
{
39-
{MonetaryAccountBank.FIELD_CURRENCY, Currency},
40-
{MonetaryAccountBank.FIELD_DESCRIPTION, Description}
39+
{MonetaryAccountBank.FIELD_CURRENCY, MonetaryAccountBankCurrency},
40+
{MonetaryAccountBank.FIELD_DESCRIPTION, MonetaryAccountBankDescription}
4141
};
4242
var monetaryAccountToCloseId = MonetaryAccountBank.Create(ApiContext, requestMap, UserId).Value;
4343

@@ -48,10 +48,10 @@ private static void DeleteMonetaryAccount(int idToClose)
4848
{
4949
var requestMap = new Dictionary<string, object>
5050
{
51-
{MonetaryAccountBank.FIELD_STATUS, Status},
52-
{MonetaryAccountBank.FIELD_SUB_STATUS, SubStatus},
53-
{MonetaryAccountBank.FIELD_REASON, Reason},
54-
{MonetaryAccountBank.FIELD_REASON_DESCRIPTION, ReasonDescription}
51+
{MonetaryAccountBank.FIELD_STATUS, MonetaryAccountBankStatus},
52+
{MonetaryAccountBank.FIELD_SUB_STATUS, MonetaryAccountBankSubStatus},
53+
{MonetaryAccountBank.FIELD_REASON, MonetaryAccountBankReason},
54+
{MonetaryAccountBank.FIELD_REASON_DESCRIPTION, MonetaryAccountBankReasonDescription}
5555
};
5656
MonetaryAccountBank.Update(ApiContext, requestMap, UserId, idToClose);
5757
}

BunqSdk.Tests/Model/Generated/Endpoint/PaymentChatTest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public class PaymentChatTest : BunqSdkTestBase
1717
/// <summary>
1818
/// Config values.
1919
/// </summary>
20-
private const string Amount = "0.01";
21-
private const string Currency = "EUR";
22-
private const string Description = "Payment From C# Test";
23-
private const string Text = "test msg send from C# test";
20+
private const string PaymentChatAmountEur = "0.01";
21+
private const string PaymentChatCurrency = "EUR";
22+
private const string PaymentChatDescription = "Payment From C# Test";
23+
private const string PaymentChatText = "test msg send from C# test";
2424

2525
private static readonly int UserId = Config.GetUserId();
2626
private static readonly int MonetaryAccountId = Config.GetMonetarytAccountId();
@@ -43,7 +43,7 @@ public void TestSendPaymentChat()
4343

4444
var chatMessageMap = new Dictionary<string, object>
4545
{
46-
{ChatMessageText.FIELD_TEXT, Text}
46+
{ChatMessageText.FIELD_TEXT, PaymentChatText}
4747
};
4848
ChatMessageText.Create(ApiContext, chatMessageMap, UserId, chatId);
4949
}
@@ -52,9 +52,9 @@ private static int CreatePaymentAndGetId()
5252
{
5353
var requestMap = new Dictionary<string, object>
5454
{
55-
{Payment.FIELD_AMOUNT, new Amount(Amount, Currency)},
55+
{Payment.FIELD_AMOUNT, new Amount(PaymentChatAmountEur, PaymentChatCurrency)},
5656
{Payment.FIELD_COUNTERPARTY_ALIAS, CounterPartyAlias},
57-
{Payment.FIELD_DESCRIPTION, Description},
57+
{Payment.FIELD_DESCRIPTION, PaymentChatDescription},
5858
};
5959

6060
return Payment.Create(ApiContext, requestMap, UserId, MonetaryAccountId).Value;

BunqSdk.Tests/Model/Generated/Endpoint/PaymentTest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public class PaymentTest : BunqSdkTestBase
1515
/// <summary>
1616
/// Config values.
1717
/// </summary>
18-
private const string Amount = "0.01";
19-
private const string Currency = "EUR";
20-
private const string Description = "C# test Payment";
18+
private const string PaymentAmountEur = "0.01";
19+
private const string PaymentCurrency = "EUR";
20+
private const string PaymentDescription = "C# test Payment";
2121

2222
private static readonly int UserId = Config.GetUserId();
2323
private static readonly int MonetaryAccountId = Config.GetMonetarytAccountId();
@@ -39,8 +39,8 @@ public void TestMakePaymentToOtherUser()
3939
{
4040
var requestMap = new Dictionary<string, object>
4141
{
42-
{Payment.FIELD_AMOUNT, new Amount(Amount, Currency)},
43-
{Payment.FIELD_DESCRIPTION, Description},
42+
{Payment.FIELD_AMOUNT, new Amount(PaymentAmountEur, PaymentCurrency)},
43+
{Payment.FIELD_DESCRIPTION, PaymentDescription},
4444
{Payment.FIELD_COUNTERPARTY_ALIAS, CounterPartyOther}
4545
};
4646

@@ -57,8 +57,8 @@ public void TestMakePaymentToOtherAccount()
5757
{
5858
var requestMap = new Dictionary<string, object>
5959
{
60-
{Payment.FIELD_AMOUNT, new Amount(Amount, Currency)},
61-
{Payment.FIELD_DESCRIPTION, Description},
60+
{Payment.FIELD_AMOUNT, new Amount(PaymentAmountEur, PaymentCurrency)},
61+
{Payment.FIELD_DESCRIPTION, PaymentDescription},
6262
{Payment.FIELD_COUNTERPARTY_ALIAS, CounterPartySelf}
6363
};
6464

BunqSdk.Tests/Model/Generated/Endpoint/RequestInquiryTest.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public class RequestInquiryTest : BunqSdkTestBase
1616
/// <summary>
1717
/// Config values.
1818
/// </summary>
19-
private const string Amount = "0.01";
20-
private const string Currency = "EUR";
21-
private const string Description = "C# test Payment";
22-
private const string Status = "ACCEPTED";
19+
private const string RequestInquiryAmountEur = "0.01";
20+
private const string RequestInquiryCurrency = "EUR";
21+
private const string RequestInquiryDescription = "C# test Payment";
22+
private const string RequestInquiryStatus = "ACCEPTED";
2323
private const int IndexFirst = 0;
2424

2525
private static readonly int UserId = Config.GetUserId();
@@ -30,7 +30,7 @@ public class RequestInquiryTest : BunqSdkTestBase
3030
/// <summary>
3131
/// API context to use for the test API calls.
3232
/// </summary>
33-
private static readonly ApiContext API_CONTEXT = GetApiContext();
33+
private static readonly ApiContext ApiContext = GetApiContext();
3434

3535
/// <summary>
3636
/// Tests sending a request from monetary account 1 to monetary account 2 and accepting this request.
@@ -40,28 +40,27 @@ public void TestRequestInquiry()
4040
{
4141
var requestMap = new Dictionary<string, object>
4242
{
43-
{RequestInquiry.FIELD_AMOUNT_INQUIRED, new Amount(Amount, Currency)},
43+
{RequestInquiry.FIELD_AMOUNT_INQUIRED, new Amount(RequestInquiryAmountEur, RequestInquiryCurrency)},
4444
{RequestInquiry.FIELD_COUNTERPARTY_ALIAS, CounterSelfParty},
45-
{RequestInquiry.FIELD_DESCRIPTION, Description},
45+
{RequestInquiry.FIELD_DESCRIPTION, RequestInquiryDescription},
4646
{RequestInquiry.FIELD_ALLOW_BUNQME, false}
4747
};
4848

49-
RequestInquiry.Create(API_CONTEXT, requestMap, UserId, MonetaryAccountId);
49+
RequestInquiry.Create(ApiContext, requestMap, UserId, MonetaryAccountId);
5050

51-
Assert.Equal(Status, AcceptRequest());
51+
Assert.Equal(RequestInquiryStatus, AcceptRequest());
5252
}
5353

5454
private static string AcceptRequest()
5555
{
56-
var requestResponseId = RequestResponse
57-
.List(API_CONTEXT, UserId, SecondMonetaryAccountId).Value[IndexFirst].Id.Value;
56+
var requestResponseId = RequestResponse.List(ApiContext, UserId, SecondMonetaryAccountId).Value[IndexFirst].Id.Value;
5857

5958
var requestMap = new Dictionary<string, object>
6059
{
61-
{RequestResponse.FIELD_STATUS, Status}
60+
{RequestResponse.FIELD_STATUS, RequestInquiryStatus}
6261
};
6362

64-
return RequestResponse.Update(API_CONTEXT, requestMap, UserId, SecondMonetaryAccountId,
63+
return RequestResponse.Update(ApiContext, requestMap, UserId, SecondMonetaryAccountId,
6564
requestResponseId).Value.Status;
6665
}
6766
}

BunqSdk.Tests/Model/Generated/Endpoint/TabUsageSingleTest.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public class TabUsageSingleTest : BunqSdkTestBase
1616
/// <summary>
1717
/// Config values
1818
/// </summary>
19-
private const string TabDescription = "Pay the tab for Java test please.";
20-
private const string StatusOpen = "OPEN";
21-
private const string Amount = "42.00";
22-
private const string Currency = "EUR";
23-
private const string TabItemDescription = "Super expensive java tea";
24-
private const string StatusWaiting = "WAITING_FOR_PAYMENT";
19+
private const string TabUsageSingleDescription = "Pay the tab for Java test please.";
20+
private const string TabUsageSingleStatusOpen = "OPEN";
21+
private const string TabAmountEur = "42.00";
22+
private const string TabCurrency = "EUR";
23+
private const string TabItemShopDescription = "Super expensive java tea";
24+
private const string TabUsageSingleStatusWaiting = "WAITING_FOR_PAYMENT";
2525

2626
private static readonly int UserId = Config.GetUserId();
2727
private static readonly int MonetaryAccountId = Config.GetMonetarytAccountId();
@@ -46,7 +46,7 @@ public void TestCreateTabAndUpdate()
4646

4747
var updateTabMap = new Dictionary<string, object>
4848
{
49-
{TabUsageSingle.FIELD_STATUS, StatusWaiting}
49+
{TabUsageSingle.FIELD_STATUS, TabUsageSingleStatusWaiting}
5050
};
5151
TabUsageSingle.Update(ApiContext, updateTabMap, UserId, MonetaryAccountId, CashRegisterId, tabUuid);
5252

@@ -62,9 +62,9 @@ private static string CreateTabAndGetUuid()
6262
{
6363
var createTabMap = new Dictionary<string, object>
6464
{
65-
{TabUsageSingle.FIELD_DESCRIPTION, TabDescription},
66-
{TabUsageSingle.FIELD_STATUS, StatusOpen},
67-
{TabUsageSingle.FIELD_AMOUNT_TOTAL, new Amount(Amount, Currency)}
65+
{TabUsageSingle.FIELD_DESCRIPTION, TabUsageSingleDescription},
66+
{TabUsageSingle.FIELD_STATUS, TabUsageSingleStatusOpen},
67+
{TabUsageSingle.FIELD_AMOUNT_TOTAL, new Amount(TabAmountEur, TabCurrency)}
6868
};
6969

7070
return TabUsageSingle.Create(ApiContext, createTabMap, UserId, MonetaryAccountId,
@@ -75,8 +75,8 @@ private static void AddTabItem(string tabUuid)
7575
{
7676
var tabItemMap = new Dictionary<string, object>
7777
{
78-
{TabItemShop.FIELD_AMOUNT, new Amount(Amount, Currency)},
79-
{TabItemShop.FIELD_DESCRIPTION, TabItemDescription}
78+
{TabItemShop.FIELD_AMOUNT, new Amount(TabAmountEur, TabCurrency)},
79+
{TabItemShop.FIELD_DESCRIPTION, TabItemShopDescription}
8080
};
8181
TabItemShop.Create(ApiContext, tabItemMap, UserId, MonetaryAccountId, CashRegisterId, tabUuid);
8282
}

0 commit comments

Comments
 (0)