Пример #1
0
        public void TestMultipleSameCurrencyWalletGetCurrency()
        {
            var wallet = new Wallet();

            wallet.AddCurrencyValue("HRK", 100);
            wallet.AddCurrencyValue("HRK", 50);

            Assert.AreEqual(
                150,
                wallet.GetCurrencyValue("HRK"),
                "multiple item wallet bla bla"
                );
        }
Пример #2
0
        public void TestMultipleSameCurrencyWalletGetCurrency()
        {
            var wallet = new Wallet();

            wallet.AddCurrencyValue("HRK", 100);
            wallet.AddCurrencyValue("HRK", 50);

            Assert.AreEqual
            (
                150,
                wallet.GetCurrencyValue("HRK"),
                "should aggregate added values"
            );
        }
Пример #3
0
        public void TestSingleIOtemWalletGetCurrency()
        {
            var wallet = new Wallet();

            wallet.AddCurrencyValue("HRK", 100);

            Assert.AreEqual(
                100,
                wallet.GetCurrencyValue("HRK"),
                "single item wallet bla bla"
                );
        }
Пример #4
0
        public void TestSingleItemWalletGetCurrency()
        {
            var wallet = new Wallet();

            wallet.AddCurrencyValue("HRK", 100);


            Assert.AreEqual
            (
                100,
                wallet.GetCurrencyValue("HRK"),
                "Single item wallet sahould return previously added"
            );
        }
Пример #5
0
 public void AddValue(int value)
 {
     wallet.AddCurrencyValue(currency, value);
 }
Пример #6
0
        [ExpectedException(typeof(InvalidProgramException))]  //da metoda očekiva exeption i da se dobro ponaša samo ako dođe do tog exeptiona
        public void TestAddCurrencyCrashesIfFormatLengthInvalid()
        {
            var wallet = new Wallet();

            wallet.AddCurrencyValue("hrk", 100);
        }