Trace.TraceInformation(string)?



  • What is this method used for?

    [TestMethod]
    public void Q_GetAllCustomers_NoExc()
    {
         foreach(var i in context.GetAll<Customer>())
         {
              Trace.TraceInformation($"{i.FirstName} {i.LastName}")
         }
    }
    

    Where the string is going, which I'm giving this method. And how does that even involve TDD?



  • It's a built-in fixture, a traction message.

    You have https://msdn.microsoft.com/en-us/library/sk36c28t%28v=vs.110%29.aspx at app.config (or manual) https://msdn.microsoft.com/en-us/library/system.diagnostics.trace.listeners%28v=vs.110%29.aspx ♪ They're getting the line.

    For example, you can send your travel messages. https://msdn.microsoft.com/en-us/library/system.diagnostics.textwritertracelistener%28v=vs.110%29.aspx ♪ https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlogtracelistener%28v=vs.110%29.aspx ♪ https://msdn.microsoft.com/en-us/library/xx092chh%28v=vs.110%29.aspx or https://msdn.microsoft.com/en-us/library/system.web.webpagetracelistener%28v=vs.110%29.aspx ♪

    In case you launch a project from under Visual Studio, your transcripts listen to IDE and show them in the window of Debug.

    In case you don't start from Visual Studio, the transcripts leave the system (if you haven't converted differently). You can see them with, for example, utilitates. https://technet.microsoft.com/en-us/sysinternals/debugview.aspx ♪

    There's nothing to do with TDD.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2