public void TestConstructor2()
        {
            var account1 = new CumulativeAccount("acc1", "client1", 20000M);
            var account2 = new CumulativeAccount("acc2", "client2", 200000M);
            var account3 = new CumulativeAccount("", "", 0M);

            Assert.AreEqual("acc1", account1.AccountNumber);
            Assert.AreEqual("client1", account1.AccountOwner);
            Assert.AreEqual(20000M, account1.AccountBalance);
            Assert.AreEqual(AccountStatus.Opened, account1.Status);
            Assert.AreEqual(20000M, account1.InitBalance);
            Assert.AreEqual(3.5M, account1.InterestsRate);

            Assert.AreEqual("acc2", account2.AccountNumber);
            Assert.AreEqual("client2", account2.AccountOwner);
            Assert.AreEqual(200000M, account2.AccountBalance);
            Assert.AreEqual(AccountStatus.Opened, account2.Status);
            Assert.AreEqual(200000M, account2.InitBalance);
            Assert.AreEqual(4.5M, account2.InterestsRate);

            Assert.AreEqual("", account3.AccountNumber);
            Assert.AreEqual("", account3.AccountOwner);
            Assert.AreEqual(10000M, account3.AccountBalance);
            Assert.AreEqual(AccountStatus.Opened, account3.Status);
            Assert.AreEqual(10000M, account3.InitBalance);
            Assert.AreEqual(2.5M, account3.InterestsRate);

            account3.AccountOwner  = "client3";
            account3.AccountNumber = "acc3";

            Assert.AreEqual("acc3", account3.AccountNumber);
            Assert.AreEqual("client3", account3.AccountOwner);
        }
        public void PositiveTestInterestsCapitalization()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);
            var result  = account.InterestsCapitalization();

            Assert.AreEqual(true, result);
            Assert.AreEqual(100.20M, account.AccountBalance);
        }
        public void PositiveTestCloseAccount()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);

            account.ZeroingAccount();
            var result = account.CloseAccount();

            Assert.AreEqual(true, result);
        }
        public void PositiveTestAddFunds()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);
            var result1 = account.AddFunds(100M);
            var result2 = account.AddFunds(0M);

            Assert.AreEqual(true, result1);
            Assert.AreEqual(true, result2);
            Assert.AreEqual(200M, account.AccountBalance);
            Assert.AreEqual(100M, account.InitBalance);
        }
        public void NegativeTestZeroingAccount()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);

            account.ZeroingAccount();
            account.CloseAccount();
            var result = account.ZeroingAccount();

            Assert.AreEqual(false, result);
            Assert.AreEqual(0M, account.AccountBalance);
        }
        public void TestConstructor1()
        {
            var account = new CumulativeAccount("acc1", "client1");

            Assert.AreEqual("acc1", account.AccountNumber);
            Assert.AreEqual("client1", account.AccountOwner);
            Assert.AreEqual(10000M, account.AccountBalance);
            Assert.AreEqual(AccountStatus.Opened, account.Status);
            Assert.AreEqual(10000M, account.InitBalance);
            Assert.AreEqual(2.5M, account.InterestsRate);
        }
        public void NegativeTestCloseAccount()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);
            var result1 = account.CloseAccount();

            account.ZeroingAccount();
            account.CloseAccount();
            var result2 = account.CloseAccount();

            Assert.AreEqual(false, result1);
            Assert.AreEqual(false, result2);
        }
        public void NegativeTestAddFunds()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);
            var result1 = account.AddFunds(-50M);

            Assert.AreEqual(false, result1);
            Assert.AreEqual(100M, account.AccountBalance);

            account.ZeroingAccount();
            account.CloseAccount();
            var result2 = account.AddFunds(50M);

            Assert.AreEqual(false, result2);
            Assert.AreEqual(0M, account.AccountBalance);
        }
        public void NegativeTestInterestsCapitalization()
        {
            var account = new CumulativeAccount("acc1", "client1", 100M);

            account.ZeroingAccount();
            var result = account.InterestsCapitalization();

            Assert.AreEqual(false, result);
            Assert.AreEqual(0.00M, account.AccountBalance);

            account.CloseAccount();
            var result2 = account.InterestsCapitalization();

            Assert.AreEqual(false, result2);
            Assert.AreEqual(0.00M, account.AccountBalance);
        }
 public void NegativeTestConstructor2()
 {
     var account1 = new CumulativeAccount("acc1", "client1", -10000M);
 }