Does anyone know why this never prints? I may be ignoring something simple but for some reason I cannot print anything within a test method, not this nor console.write seems to work.
Is there any way to print anything within test methods if any?
[TestMethod]
public void TestMethodAddUser()
{
int [] resul = new int[1];
resultado = gestor.addUser("El Pelucas", "12345", "elpelucassabe@gmail.com");
Console.WriteLine(resul[1].ToString());
try
{
if (resul[1] > 0)
{
switch (resul[1])
{
case -1:
Console.WriteLine("Username taken.");
break;
case -2:
Console.WriteLine("Email address taken.");
break;
}
Console.WriteLine("User added.");
Assert.IsTrue(true);
}
}
catch (Exception ex)
{
Assert.Fail(ex.ToString());
}
}