Exemplo n.º 1
0
        public void RefreshData_Execution_ShouldUpdateCurrencyPairFields()
        {
            Bank bank = new Bank(BankTests.BANK_NAME, this.prePreparedFakeProvider);


            bank.RefreshData();


            Assert.That(bank.USDtoRUB.Bid, Is.EqualTo(BankTests.USD_BID));
            Assert.That(bank.USDtoRUB.Ask, Is.EqualTo(BankTests.USD_ASK));

            Assert.That(bank.EURtoRUB.Bid, Is.EqualTo(BankTests.EUR_BID));
            Assert.That(bank.EURtoRUB.Ask, Is.EqualTo(BankTests.EUR_ASK));
        }
Exemplo n.º 2
0
        public void RefreshData_Execution_ShouldRaiseEvent()
        {
            bool eventHasRaised = false;

            Bank bank = new Bank(BankTests.BANK_NAME, this.prePreparedFakeProvider);
            bank.DataRefreshed += (sender, args) => { eventHasRaised = true; };


            bank.RefreshData();


            Assert.That(eventHasRaised, Is.True);
        }
Exemplo n.º 3
0
        public void IsDataInitialized_RefreshDataExecution_ShouldReturnsTrue()
        {
            Bank bank = new Bank(BankTests.BANK_NAME, this.prePreparedFakeProvider);


            bank.RefreshData();

            
            Assert.That(bank.IsDataInitialized, Is.True);
        }