Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29845/src/Adapdev.UnitTest.Core
Modified Files:
AbstractTestIteration.cs TestRunner.cs TestSuiteBuilder.cs
TextFormatter.cs
Log Message:
Added TestDriven.NET functionality
Index: TestSuiteBuilder.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestSuiteBuilder.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TestSuiteBuilder.cs 21 Oct 2005 04:59:20 -0000 1.7
--- TestSuiteBuilder.cs 22 Oct 2005 17:15:38 -0000 1.8
***************
*** 372,378 ****
string lostAssemblyFilename = Path.Combine(Environment.CurrentDirectory, lostNamespace + ".dll");
! Trace.Write("Not found. Trying to resolve " + lostAssemblyFilename);
Assembly a = Assembly.LoadFile(lostAssemblyFilename);
! if(a != null) Trace.WriteLine("Found. Loaded " + a.GetName().Name + " - " + a.GetName().Version + " - " + a.Location);
return a;
--- 372,378 ----
string lostAssemblyFilename = Path.Combine(Environment.CurrentDirectory, lostNamespace + ".dll");
! log.Debug("Not found. Trying to resolve " + lostAssemblyFilename);
Assembly a = Assembly.LoadFile(lostAssemblyFilename);
! if(a != null) log.Debug("Found. Loaded " + a.GetName().Name + " - " + a.GetName().Version + " - " + a.Location);
return a;
***************
*** 382,386 ****
{
AssemblyName assemblyName = assembly.GetName();
! Trace.WriteLine("Probing for: " + assemblyName);
if (! dependencyList.Contains(assemblyName.FullName))
{
--- 382,386 ----
{
AssemblyName assemblyName = assembly.GetName();
! log.Debug("Probing for: " + assemblyName);
if (! dependencyList.Contains(assemblyName.FullName))
{
***************
*** 396,400 ****
public void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
{
! Trace.WriteLine("Loading: " + args.LoadedAssembly.FullName);
}
}
--- 396,400 ----
public void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
{
! log.Debug("Loading: " + args.LoadedAssembly.FullName);
}
}
Index: TestRunner.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestRunner.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TestRunner.cs 12 Jun 2005 14:24:29 -0000 1.7
--- TestRunner.cs 22 Oct 2005 17:15:38 -0000 1.8
***************
*** 225,228 ****
--- 225,229 ----
}
TestIteration ti = new TestIteration();
+ ti.Name = test.Name;
ti.Iteration = i;
ti.Thread = AppDomain.GetCurrentThreadId().ToString();
***************
*** 353,356 ****
--- 354,358 ----
{
TestIteration ti = new TestIteration();
+ ti.Name = test.Name;
ti.State = TestState.Ignore;
ti.Result = test.IgnoreReason;
Index: AbstractTestIteration.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/AbstractTestIteration.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractTestIteration.cs 28 Feb 2005 01:32:20 -0000 1.1.1.1
--- AbstractTestIteration.cs 22 Oct 2005 17:15:38 -0000 1.2
***************
*** 53,56 ****
--- 53,57 ----
protected string _traceOutput = "";
protected int _iteration = 0;
+ protected string _name = String.Empty;
public string ConsoleError
***************
*** 131,134 ****
--- 132,141 ----
}
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+
}
}
\ No newline at end of file
Index: TextFormatter.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TextFormatter.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TextFormatter.cs 9 Jun 2005 04:20:23 -0000 1.5
--- TextFormatter.cs 22 Oct 2005 17:15:38 -0000 1.6
***************
*** 86,90 ****
{
if(tar.Iterations.Count > 1) sb.Append(this.GetNesting(nesting) + "Iteration: " + ati.Iteration + "\r\n");
! sb.AppendFormat(this.GetNesting(nesting + 1) + this.GetMarker(tar) + "{0} - {1}\t\t\tTime: {2}s\r\n", tar.Name, tar.State, tar.GetAverageDuration());
if((tar is TestResult) && ((tar as TestResult).Description.Length > 0)) sb.AppendFormat(this.GetNesting(nesting + 2) + "Description: {0}\r\n", (tar as TestResult).Description);
--- 86,91 ----
{
if(tar.Iterations.Count > 1) sb.Append(this.GetNesting(nesting) + "Iteration: " + ati.Iteration + "\r\n");
! sb.AppendFormat(this.GetNesting(nesting + 1) + this.GetMarker(tar) + "{0} - {1}\r\n", tar.Name, tar.State);
! //sb.AppendFormat(this.GetNesting(nesting + 1) + this.GetMarker(tar) + "Time: {0}s\r\n", tar.GetTotalDuration());
if((tar is TestResult) && ((tar as TestResult).Description.Length > 0)) sb.AppendFormat(this.GetNesting(nesting + 2) + "Description: {0}\r\n", (tar as TestResult).Description);
|