Ejemplo n.º 1
0
    public void InitializeUI()
    {
        GiveMoneyTo.onValueChanged.RemoveAllListeners();
        AmountToGive.onValueChanged.RemoveAllListeners();

        AmountToGive.text = "0";
        AmountToGive.onValueChanged.AddListener(ValidateInputField);

        SetActiveBoolOnGoArray(ReceiverPart, true);

        FinanceLogic.Bank bank = FindObjectOfType <ManagementScripts.GameManager>().bank;


        //FIXME: use dropdownhandler instead
        GiveMoneyTo.gameObject.GetComponent <DropdownHandler>().PopulateDropDown(FinancialDataSupplier.AccountsIDs(bank), currentAccountId);

        GiveMoneyTo.onValueChanged.AddListener(DropdownListener);



        SetActiveBoolOnGoArray(AmountPart, true);

        SetActiveBoolOnGoArray(ReceiverPart, false);

        ConfirmButton.SetActive(false);

        NewTransactionButton.SetActive(false);
    }
 public void DisplayAccounts(bool isVisible)
 {
     if (!isVisible)
     {
         Bank bank = FindObjectOfType <ManagementScripts.GameManager>().bank;
         textDisplayTemplate.GetComponent <IDisplayAccounts>().Display(FinancialDataSupplier.AccountsIDs(bank));
     }
 }
Ejemplo n.º 3
0
        public void can_create_an_account_and_verify_exists()
        {
            string accountRequestedID = "Test Account Name String";
            Bank   bank           = new Bank();
            string accountGivenID = FinancialDataCreator.CreateNewAccount(bank, accountRequestedID);


            Assert.NotNull(FinancialDataSupplier.AccountsIDs(bank));
            Assert.AreEqual(FinancialDataSupplier.AccountsIDs(bank)[FinancialDataSupplier.AccountsIDs(bank).Length - 1], accountGivenID);
        }