Exemplo n.º 1
0
        public async Task Add()
        {
            deliveryContext          dosificacionesContext    = new deliveryContext();
            DosificacionesController dosificacionesController = new DosificacionesController(dosificacionesContext);
            var result = await dosificacionesController.PostDosificacion(new Dosificacion()
            {
                NroAutorizacion     = 0,
                NroFacturaActual    = 0,
                Llave               = "text",
                FechaLimiteEmision  = DateTime.Now,
                Leyenda             = "text",
                FechaActivacion     = DateTime.Now,
                Activa              = 0,
                ActividadPrincipal  = "text",
                ActividadSecundaria = "text"
            });


            Assert.IsNotNull(result.Result);
            Dosificacion dosificacion = (Dosificacion)(result.Result as CreatedAtActionResult).Value;

            Assert.IsNotNull(dosificacion);
            Assert.IsTrue(dosificacion.Id > 0);
            idDosificacion = dosificacion.Id;
        }
Exemplo n.º 2
0
        public async Task Del()
        {
            deliveryContext          dosificacionesContext    = new deliveryContext();
            DosificacionesController dosificacionesController = new DosificacionesController(dosificacionesContext);
            var result = await dosificacionesController.DeleteDosificacion(idDosificacion);


            Assert.IsNotNull(result);
        }
Exemplo n.º 3
0
        public async Task Get()
        {
            deliveryContext          dosificacionesContext    = new deliveryContext();
            DosificacionesController dosificacionesController = new DosificacionesController(dosificacionesContext);
            var result = await dosificacionesController.GetDosificaciones(new PageAndSortRequest()
            {
                Pagina = 1, TamPagina = 10, Columna = "Id", Direccion = "asc", Filtro = ""
            });

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Value.Datos.Count() > 0);
        }
Exemplo n.º 4
0
        public async Task Upd()
        {
            deliveryContext          dosificacionesContext    = new deliveryContext();
            DosificacionesController dosificacionesController = new DosificacionesController(dosificacionesContext);
            var result = await dosificacionesController.PutDosificacion(idDosificacion, new Dosificacion()
            {
                NroAutorizacion     = 0,
                NroFacturaActual    = 0,
                Llave               = "text",
                FechaLimiteEmision  = DateTime.Now,
                Leyenda             = "text",
                FechaActivacion     = DateTime.Now,
                Activa              = 0,
                ActividadPrincipal  = "text",
                ActividadSecundaria = "text"
            });



            Assert.IsNotNull(result);
        }