public void test22CertificateOfDepositShouldWithdrawInvestmentValue()
        {
            ReceptiveAccount account   = new ReceptiveAccount();
            ReceptiveAccount toAccount = new ReceptiveAccount();

            Deposit.registerForOn(1000, account);
            Withdraw.registerForOn(50, account);
            Transfer.registerFor(100, account, toAccount);
            CertificateOfDeposit.registerFor(100, 30, 0.1, account);

            Assert.AreEqual(100.0, investmentNet(account));
            Assert.AreEqual(750.0, account.balance());
        }
        public void test25ShouldBeAbleToBeQueryTransferNetWithCertificateOfDeposit()
        {
            ReceptiveAccount fromAccount = new ReceptiveAccount();
            ReceptiveAccount toAccount   = new ReceptiveAccount();

            Deposit.registerForOn(100, fromAccount);
            Withdraw.registerForOn(50, fromAccount);
            Transfer.registerFor(100, fromAccount, toAccount);
            Transfer.registerFor(250, toAccount, fromAccount);
            CertificateOfDeposit.registerFor(1000, 30, 0.1, fromAccount);

            Assert.AreEqual(150.0, accountTransferNet(fromAccount));
            Assert.AreEqual(-150.0, accountTransferNet(toAccount));
        }
        public void test20AccountSummaryShouldProvideHumanReadableTransactionsDetail()
        {
            ReceptiveAccount fromAccount = new ReceptiveAccount();
            ReceptiveAccount toAccount   = new ReceptiveAccount();

            Deposit.registerForOn(100, fromAccount);
            Withdraw.registerForOn(50, fromAccount);
            Transfer.registerFor(100, fromAccount, toAccount);

            List <String> lines = accountSummaryLines(fromAccount);

            Assert.AreEqual(3, lines.Count);
            Assert.AreEqual("Depósito por 100.0", lines.ElementAt(0));
            Assert.AreEqual("Extracción por 50.0", lines.ElementAt(1));
            Assert.AreEqual("Transferencia por -100.0", lines.ElementAt(2));
        }
        public void test24AccountSummaryShouldWorkWithCertificateOfDeposit()
        {
            ReceptiveAccount fromAccount = new ReceptiveAccount();
            ReceptiveAccount toAccount   = new ReceptiveAccount();

            Deposit.registerForOn(100, fromAccount);
            Withdraw.registerForOn(50, fromAccount);
            Transfer.registerFor(100, fromAccount, toAccount);
            CertificateOfDeposit.registerFor(1000, 30, 0.1, fromAccount);

            List <String> lines = accountSummaryLines(fromAccount);

            Assert.AreEqual(4, lines.Count);
            Assert.AreEqual("Depósito por 100.0", lines.ElementAt(0));
            Assert.AreEqual("Extracción por 50.0", lines.ElementAt(1));
            Assert.AreEqual("Transferencia por -100.0", lines.ElementAt(2));
            Assert.AreEqual("Plazo fijo por 1000.0 durante 30 días a una tna de 0.1", lines.ElementAt(3));
        }