I have a sample unit/functional test example below.
What I want is that, launching Console before tests runs and outputting Console.WriteLine into this console.
public class User
{
public string UserName { get; set; }
}
[TestMethod]
public void TestUserInitialize()
{
// Launch Console, and see Console.WriteLine output here?
User user = new User();
InitializeUser(user);
}
private void InitializeUser(User user)
{
Console.WriteLine("Checking user: " + user.UserName);
Assert.IsTrue(!string.IsNullOrEmpty(user.UserName));
}
Currently I can do Debug.WriteLine to see output in Visual Studio, but I would like to make it easier to track in separate console window. Also it will help to execute console examples given on internet, if they are already using Console.WriteLine.
Is there any easy way to do this?
