public void VariablesControllerTest() { ws = new WsAdministracionVariables.Controllers.VariablesController(_configuration); var result = ws.Index().ToString().Trim(); Assert.AreEqual(Expected, result); }
public void IndexTest() { ws = new WsAdministracionVariables.Controllers.VariablesController(_configuration); Microsoft.AspNetCore.Mvc.IActionResult result = ws.Index(); var okResult = result as Microsoft.AspNetCore.Mvc.OkObjectResult; Assert.AreEqual("{ saludo = Hola Mundo }", okResult.Value.ToString()); }