hi all (again),
For custom MSBuild tasks, I find it easy to create unit tests. Something like
this:
[TestMethod]
public void TestCreateGuid()
{
Microsoft.Sdc.AU.Common.tasks.Common.CreateGuid task =
new Microsoft.Sdc.AU.Common.tasks.Common.CreateGuid();
task.Format = "N";
Assert.IsTrue(task.Execute());
Assert.AreEqual<int>(32, task.Output.Length);
}
(this test is based on Grant Holliday's CreateGuid task here:
http://ozgrant.com/2008/04/04/createguid-msbuild-task/)
The downside is that most Tasks use the logger to log info messages, or
exceptions, etc.
I was wondering if there was a way to clear the log handler? It seems pretty
embedded and unlike standard Trace logger stuff (which would easily let me
clear the handler so that it didn't output anywhere, or even better, output
somewhere different in the case of unit tests).
Any ideas?
Cheers,
Steve
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
OzTFS.com - to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net