[Adapdev-commits] Adapdev/src/Adapdev.UnitTest.Core.Tests NUnitLocalSeparateTestEngineTest.cs,1.4,1.
Status: Beta
Brought to you by:
intesar66
From: Sean M. <int...@us...> - 2006-03-29 05:30:57
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.UnitTest.Core.Tests Modified Files: NUnitLocalSeparateTestEngineTest.cs NUnitLocalTestEngineTest.cs Log Message: Index: NUnitLocalTestEngineTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests/NUnitLocalTestEngineTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NUnitLocalTestEngineTest.cs 16 Nov 2005 07:01:53 -0000 1.4 --- NUnitLocalTestEngineTest.cs 29 Mar 2006 05:30:53 -0000 1.5 *************** *** 17,20 **** --- 17,40 ---- [Test] + public void LoadNUnit2_2_7() + { + Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); + ITestEngine engine = TestEngineFactory.CreateLocal(basedir + @"\nunit\227\nunit.framework.tests.dll"); + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + + [Test] + public void LoadNUnit2_2_6() + { + Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); + ITestEngine engine = TestEngineFactory.CreateLocal(basedir + @"\nunit\226\nunit.framework.tests.dll"); + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + + [Test] public void LoadNUnit2_2_2() { Index: NUnitLocalSeparateTestEngineTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests/NUnitLocalSeparateTestEngineTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NUnitLocalSeparateTestEngineTest.cs 16 Nov 2005 07:01:53 -0000 1.4 --- NUnitLocalSeparateTestEngineTest.cs 29 Mar 2006 05:30:53 -0000 1.5 *************** *** 16,19 **** --- 16,42 ---- private static readonly string basedir = @AppDomain.CurrentDomain.BaseDirectory; + + [Test] + public void LoadNUnit2_2_7() + { + using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\227\nunit.framework.tests.dll.config", basedir + @"\nunit\227\nunit.framework.tests.dll")) + { + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + } + + [Test] + public void LoadNUnit2_2_6() + { + using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\226\nunit.framework.tests.dll.config", basedir + @"\nunit\226\nunit.framework.tests.dll")) + { + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + } + [Test] public void LoadNUnit2_2_2() *************** *** 21,24 **** --- 44,48 ---- using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\222\nunit.framework.tests.dll.config", basedir + @"\nunit\222\nunit.framework.tests.dll")) { + Assert.AreEqual(basedir + @"\nunit\222\nunit.framework.tests.dll.config", engine.ConfigurationFile, "Configuration file was not automatically detected."); Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); TestAssembly assembly = engine.GetTestAssembly(); *************** *** 38,48 **** } ! [Test] public void RunNUnit2_2_2() { using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\222\nunit.framework.tests.dll.config", basedir + @"\nunit\222\nunit.framework.tests.dll")) { Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); TestAssembly assembly = engine.GetTestAssembly(); Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); --- 62,90 ---- } ! [Test,Ignore("")] public void RunNUnit2_2_2() { + TestEventDispatcher disp = new TestEventDispatcher(); + disp.BaseTestHelperStarted+=new BaseTestHelperStartedEventHandler(disp_BaseTestHelperStarted); + disp.TestAssemblyCompleted+=new TestAssemblyCompletedEventHandler(disp_TestAssemblyCompleted); + disp.TestAssemblyIterationCompleted+=new TestAssemblyIterationCompletedEventHandler(disp_TestAssemblyIterationCompleted); + disp.TestAssemblyIterationStarted+=new TestAssemblyIterationStartedEventHandler(disp_TestAssemblyIterationStarted); + disp.TestAssemblyStarted+=new TestAssemblyStartedEventHandler(disp_TestAssemblyStarted); + disp.TestCompleted+=new TestCompletedEventHandler(disp_TestCompleted); + disp.TestFixtureCompleted+=new TestFixtureCompletedEventHandler(disp_TestFixtureCompleted); + disp.TestFixtureIterationCompleted+=new TestFixtureIterationCompletedEventHandler(disp_TestFixtureIterationCompleted); + disp.TestFixtureIterationStarted+=new TestFixtureIterationStartedEventHandler(disp_TestFixtureIterationStarted); + disp.TestStarted+=new TestStartedEventHandler(disp_TestStarted); + disp.TestSuiteCompleted+=new TestSuiteCompletedEventHandler(disp_TestSuiteCompleted); + disp.TestIterationCompleted+=new TestIterationCompletedEventHandler(disp_TestIterationCompleted); + disp.TestIterationStarted+=new TestIterationStartedEventHandler(disp_TestIterationStarted); + using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\222\nunit.framework.tests.dll.config", basedir + @"\nunit\222\nunit.framework.tests.dll")) { + engine.SetTestEventDispatcher(disp); Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); TestAssembly assembly = engine.GetTestAssembly(); + Console.WriteLine(engine.ConfigurationFile); + Console.WriteLine(Environment.CurrentDirectory); Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); *************** *** 88,91 **** --- 130,200 ---- } + + + private void disp_TestAssemblyCompleted(object sender, TestAssemblyResultEventArgs e) + { + Console.WriteLine("disp_TestAssemblyCompleted"); + } + + private void disp_BaseTestHelperStarted(object sender, BaseTestHelperEventArgs e) + { + Console.WriteLine(e.BaseTestHelper.Method + " - " + e.BaseTestHelper.Name); + //Console.WriteLine("disp_BaseTestHelperStarted"); + } + + private void disp_TestAssemblyIterationCompleted(object sender, TestAssemblyIterationEventArgs e) + { + Console.WriteLine("disp_TestAssemblyIterationCompleted"); + } + + private void disp_TestAssemblyIterationStarted(object sender, TestAssemblyEventArgs e) + { + //Console.WriteLine("disp_TestAssemblyIterationStarted"); + } + + private void disp_TestAssemblyStarted(object sender, TestAssemblyEventArgs e) + { + //Console.WriteLine("disp_TestAssemblyStarted"); + } + + private void disp_TestCompleted(object sender, TestResultEventArgs e) + { + //Console.WriteLine("disp_TestCompleted"); + } + + private void disp_TestFixtureCompleted(object sender, TestFixtureResultEventArgs e) + { + //Console.WriteLine("disp_TestFixtureCompleted"); + } + + private void disp_TestFixtureIterationCompleted(object sender, TestFixtureIterationEventArgs e) + { + //Console.WriteLine("disp_TestFixtureIterationCompleted"); + } + + private void disp_TestFixtureIterationStarted(object sender, TestFixtureEventArgs e) + { + //Console.WriteLine("disp_TestFixtureIterationStarted"); + } + + private void disp_TestStarted(object sender, TestEventArgs e) + { + //Console.WriteLine("disp_TestStarted"); + } + + private void disp_TestSuiteCompleted(object sender, TestAssemblyResult[] tar) + { + //Console.WriteLine("disp_TestSuiteCompleted"); + } + + private void disp_TestIterationCompleted(object sender, TestIterationEventArgs e) + { + //Console.WriteLine("disp_TestIterationCompleted"); + } + + private void disp_TestIterationStarted(object sender, TestEventArgs e) + { + //Console.WriteLine("disp_TestIterationStarted"); + } } } |