public JsonResult ObtenerFichas() { //json var fichasRetornadas = FichaAzure.ObtenerFichas(); return(new JsonResult(fichasRetornadas)); }
public void TestObtenerFichaPorNroFicha() { //Arrange int idProbar = 1; Ficha FichaRetornada; int resultadoEsperado = 1; //Act FichaRetornada = FichaAzure.ObtenerFichaPorNroFicha(idProbar); //Assert Assert.Equal(resultadoEsperado, FichaRetornada.NROFICHA); }
public void TestAgregarFichaPorParametros() { //Arrange int resultadoEsperado = 1; int resultadoObtenido = 0; DateTime FechaAtencion = Convert.ToDateTime("2020-10-10"); int nroficha = 5; string rutusuario = "1111111111"; //Act resultadoObtenido = FichaAzure.AgregarFichaParametros(nroficha, FechaAtencion, rutusuario); //Assert Assert.Equal(resultadoEsperado, resultadoObtenido); }
public void TestObtenerFichas() { // Arrage bool vieneConDatos = false; // Act var resultado = FichaAzure.ObtenerFichas(); vieneConDatos = resultado.Any(); // Assert Assert.True(vieneConDatos); }
public void TestAgregarFicha() { //Arrange int resultadoEsperado = 1; int resultadoObtenido = 0; Ficha ficha = new Ficha(); ficha.FECHAATENCION = Convert.ToDateTime("2020-10-10"); ficha.NROFICHA = 5; ficha.RUTUSUARIO = "1111111111"; //Act resultadoObtenido = FichaAzure.AgregarFicha(ficha); //Assert Assert.Equal(resultadoEsperado, resultadoObtenido); }
public void TestEliminarFichaPorNroFicha() { //Arrange Ficha ficha = new Ficha(); //string int NroFicha = 4; int resultadoEsperado = 1; int resultadoObtenido = 0; //Act resultadoObtenido = FichaAzure.EliminarFichaPorNroFicha(NroFicha); //Assert Assert.Equal(resultadoEsperado, resultadoObtenido); }
public JsonResult ObtenerFicha(String NROFICHA) { var conversionExitosa = int.TryParse(NROFICHA, out int idConvertido); Ficha fichaRetornada; if (conversionExitosa) { fichaRetornada = FichaAzure.ObtenerFichaPorNroFicha(idConvertido); } else { fichaRetornada = FichaAzure.ObtenerFichaPorNroRut(NROFICHA); } if (fichaRetornada is null) { return(new JsonResult($"Intente nuevamente con un parametro distinto a {NROFICHA}")); } else { return(new JsonResult(fichaRetornada)); } }
public void ActualizarFichaPorNroFicha([FromBody] Ficha ficha) { FichaAzure.ActualizarFichaPorNroFicha(ficha); }
public void EliminarFichaPorNroFicha(int nroficha) { FichaAzure.EliminarFichaPorNroFicha(nroficha); }
public void AgregarFicha([FromBody] Ficha ficha) { FichaAzure.AgregarFicha(ficha); }