コード例 #1
0
        public void DeveDecrementarOValorNoSaldo()
        {
            var valorEsperado = 500;
            var ci            = new ContaDeInvestimento(1000, "", DateTime.Today);

            ci.saque(500);
            Assert.Equal(valorEsperado, ci.Saldo);
        }
コード例 #2
0
 public void DeveImpedirOSaqueSaldoInsuficiente()
 {
     var ci = new ContaDeInvestimento(1000, "", DateTime.Today);
     var ex = Assert.Throws <SaldoInsuficienteException>(() => ci.saque(1001));
 }
コード例 #3
0
 public void DeveImpedirOSaqueValorNegativo()
 {
     var ci = new ContaDeInvestimento(1000, "", DateTime.Today);
     var ex = Assert.Throws <ArgumentException>(() => ci.saque(-50));
 }