def testRecargarSaldoCaracterEspecial(self): billetera = BilleteraElectronica(nombre='Alejandro', apellido='Banega', cedula="12345678", cedulaTipo='V', PIN="1234") billetera.recargar_saldo("&") self.assertEqual(billetera.saldo, 0)
def testRecargarSaldoInvalido(self): billetera = BilleteraElectronica(nombre='Alejandro', apellido='Banega', cedula="12345678", cedulaTipo='V', PIN="1234") billetera.recargar_saldo(Decimal(10000.01)) self.assertEqual(billetera.saldo, 0)
def testRecargarSaldoLimiteSuperior(self): billetera = BilleteraElectronica(nombre='Alejandro', apellido='Banega', cedula="12345678", cedulaTipo='V', PIN="1234") billetera.recargar_saldo(10000) self.assertEqual(billetera.saldo, 10000)
def testConsumirSaldoMontoString(self): billetera = BilleteraElectronica(nombre='Alejandro', apellido='Banega', cedula="12345678", cedulaTipo='V', PIN="1234") billetera.recargar_saldo(10) billetera.consumir_saldo("1") self.assertEqual(billetera.saldo, 10)
def testConsumirSaldoLimiteInferior(self): billetera = BilleteraElectronica(nombre='Alejandro', apellido='Banega', cedula="12345678", cedulaTipo='V', PIN="1234") billetera.recargar_saldo(Decimal('0.01')) billetera.consumir_saldo(Decimal('0.01')) self.assertEqual(billetera.saldo, 0)
def testRecargarSaldoCaracterEspecial(self): billetera = BilleteraElectronica( nombre = 'Alejandro', apellido = 'Banega', cedula = "12345678", cedulaTipo = 'V', PIN = "1234" ) billetera.recargar_saldo("&") self.assertEqual(billetera.saldo, 0)
def testRecargarSaldoInvalido(self): billetera = BilleteraElectronica( nombre = 'Alejandro', apellido = 'Banega', cedula = "12345678", cedulaTipo = 'V', PIN = "1234" ) billetera.recargar_saldo(Decimal(10000.01)) self.assertEqual(billetera.saldo, 0)
def testRecargarSaldoLimiteSuperior(self): billetera = BilleteraElectronica( nombre = 'Alejandro', apellido = 'Banega', cedula = "12345678", cedulaTipo = 'V', PIN = "1234" ) billetera.recargar_saldo(10000) self.assertEqual(billetera.saldo, 10000)
def testConsumirSaldoMontoString(self): billetera = BilleteraElectronica( nombre = 'Alejandro', apellido = 'Banega', cedula = "12345678", cedulaTipo = 'V', PIN = "1234" ) billetera.recargar_saldo(10) billetera.consumir_saldo("1") self.assertEqual(billetera.saldo, 10)
def testConsumirSaldoLimiteInferior(self): billetera = BilleteraElectronica( nombre = 'Alejandro', apellido = 'Banega', cedula = "12345678", cedulaTipo = 'V', PIN = "1234" ) billetera.recargar_saldo(Decimal('0.01')) billetera.consumir_saldo(Decimal('0.01')) self.assertEqual(billetera.saldo, 0)