Exemple #1
0
        public void Instanciar_PagoCredito_Cuota_Invalida(int numeroCuota)
        {
            Pago pago;

            Action act = () => pago = new PagoCredito(null, numeroCuota, new MontoPago(1, 1, 1, 1));

            Assert.Throws <NegocioException>(act);
        }
Exemple #2
0
        public void Instanciar_PagoCredito_Sin_Banco()
        {
            Pago pago;

            Action act = () => pago = new PagoCredito(null, 1, new MontoPago(1, 1, 1, 1));

            Assert.Throws <NegocioException>(act);
        }
Exemple #3
0
        public void Instanciar_PagoCredito_Sin_Monto()
        {
            Pago pago;

            Action act = () => pago = new PagoCredito(new Banco("banco"), 1, null);

            Assert.Throws <NegocioException>(act);
        }
Exemple #4
0
        public IActionResult Put([FromBody] PagoCredito modelo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            return(Ok(_logic.Update(modelo)));
        }
Exemple #5
0
        public IActionResult PagoCredito([FromBody] PagoCredito modelo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            modelo.Usuario_Creacion = JwtProvider.ObtenerUsuario(Request.Headers["Authorization"]);
            return(Ok(_logic.InsertarPagoCredito(modelo)));
        }