Example #1
0
        public void PositiveTestWithdrawFundsInMetal()
        {
            var account = new MetalAccount("acc1", "client1", MetalType.Argentum, 0, 500M);

            account.AddFundsInMetal(100);
            var result1 = account.WithdrawFundsInMetal(50);
            var result2 = account.WithdrawFundsInMetal(0);

            Assert.AreEqual(true, result1);
            Assert.AreEqual(true, result2);
            Assert.AreEqual(25000M, account.AccountBalance);
            Assert.AreEqual(50, account.MetalBalance);
        }
Example #2
0
        public void NegativeTestWithdrawFundsInMetal()
        {
            var account = new MetalAccount("acc1", "client1", MetalType.Aurum, 0, 1500M);

            account.CloseAccount();

            var result = account.WithdrawFundsInMetal(50);

            Assert.AreEqual(false, result);
            Assert.AreEqual(0M, account.AccountBalance);
            Assert.AreEqual(0L, account.MetalBalance);
        }