public void PalindromoCheck() { //Arrange string palindromo = "salas"; PalindromoHelper resultPalindromo = new ValidarBusqueda(palindromo); //Act var response = resultPalindromo.ValidarPalindromo(palindromo); //Assert Assert.IsTrue(response); }
public ActionResult <ResultResponse> ObtenerProductos([FromHeader] string producto) { ValidarRequestService validacionService = new ValidarRequestService(_telemetry); ResultResponse resultValidate = validacionService.CheckRequest(producto); if (!string.IsNullOrEmpty(resultValidate.IdError)) { return(BadRequest(resultValidate.MessageError)); } PalindromoHelper palindrome = new ValidarBusqueda(producto); PalindromoService objectPalindromo = new PalindromoService(palindrome, _telemetry); bool resultPalindromo = Convert.ToBoolean(objectPalindromo.ValidarPalindromo(producto).IsPalindromo); ProductosService objectService = new ProductosService(_telemetry); ResultResponse registros = objectService.ObtenerProducto(producto, resultPalindromo); return(Ok(registros)); }