private void GuardarBoton_Click(object sender, RoutedEventArgs e)
        {
            bool paso = false;

            if (mora.MoraId == 0)
            {
                return;
            }

            paso = MoraBLL.Guardar(mora);
        }
示例#2
0
        public void GuardarTest()
        {
            bool               paso        = false;
            MoraDetalle        moraDetalle = new MoraDetalle(1, 1, 1, Convert.ToDecimal(100.00));
            List <MoraDetalle> list        = new List <MoraDetalle>();

            list.Add(moraDetalle);
            Mora mora = new Mora();

            mora.MoraId = 3;
            mora.Fecha  = DateTime.Now;
            mora.Total  = Convert.ToDecimal(100.00);
            paso        = MoraBLL.Guardar(mora);
            Assert.AreEqual(paso, false);
        }
示例#3
0
        public void GuardarTest()
        {
            Moras mora = new Moras();

            mora.MoraId = 0;
            mora.Fecha  = DateTime.Now;
            mora.Total  = 10;
            mora.MoraDetalles.Add(new MoraDetalles
            {
                MoradetalleId = 0,
                MoraId        = 0,
                PrestamoId    = 1,
                Valor         = 10
            });

            Assert.IsTrue(MoraBLL.Guardar(mora));
        }
        public void GuardarTest()
        {
            Mora mora = new Mora();

            mora.moraId = 0;
            mora.fecha  = DateTime.Now;
            mora.total  = 10;
            mora.MoraDetalles.Add(new MoraDetalle
            {
                moraDetalleId = 0,
                moraId        = mora.moraId,
                prestamoId    = 1,
                valor         = 10
            });

            Assert.IsTrue(MoraBLL.Guardar(mora));
        }