exchanger/tests/runtime/PaymentRewardFormattingSmokeBridge.cs

21 lines
999 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Godot;
namespace Exchanger.Tests.Runtime;
/// <summary>
/// Даёт GDScript smoke-тесту типобезопасный доступ к C#-методам с nullable-параметрами,
/// которые Godot не публикует в Variant API. Рабочую конфигурацию тест не изменяет.
/// </summary>
public partial class PaymentRewardFormattingSmokeBridge : Node
{
public void ClearPurchaseLimits(Node cash, Node card, Node custom)
{
((global::Exchanger.Scenes.CashPaymentScreen.CashPaymentScreen)cash).SetTokenPurchaseLimit(null);
((global::Exchanger.Scenes.CardAmountScreen.CardAmountScreen)card).SetTokenPurchaseLimit(null);
((global::Exchanger.Scenes.CardCustomAmountScreen.CardCustomAmountScreen)custom).SetTokenPurchaseLimit(null);
}
public void SetCashBalance(Node cash, int amountRubles) =>
((global::Exchanger.Scenes.CashPaymentScreen.CashPaymentScreen)cash).SetBalance(amountRubles);
}