Hello,
I have the following code:
private static void WriteStartupInfo()
{
Settings settings = Settings.Default;
TimeSpan interval = settings.CleanupInterval;
TimeSpan span = settings.ExpiryTimeSpan;
string url = settings.TeamFoundationServerUrl;
StringBuilder sb = new StringBuilder();
sb.Append(String.Format("CleanupInterval:{0}{1}", interval,Environment.NewLine));
sb.Append(String.Format("ExpiryTimeSpan:{0}{1}", span,Environment.NewLine));
sb.Append(String.Format("TeamFoundationServerUrl:{0}{1}", url,Environment.NewLine));
Trace.TraceInformation(sb.ToString());
}
This needs to be tested. How do I unit test this ?
Is it as simple as removing trace listeners and adding a unit test trace listener ?
Any help will be greatly appreciated.