From acc3c88a7b515b3d11a3d924f7dc97f9b70d475a Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Thu, 7 May 2009 06:39:51 +0000 Subject: [PATCH] Fixed build - NUnit 2.5 no longer allows hiding the SetUpFixture method in derived classes. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4055 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Test/Designer/LoadControlEventHandlerTestFixture.cs | 4 +--- .../Test/Designer/LoadEventHandlerTestFixture.cs | 4 +--- .../Test/Designer/LoadFormTestFixtureBase.cs | 8 ++++++++ .../Test/CSharp/BclNRefactoryResourceResolverTests.cs | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadControlEventHandlerTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadControlEventHandlerTestFixture.cs index e38e68560e..1b5aaab722 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadControlEventHandlerTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadControlEventHandlerTestFixture.cs @@ -46,11 +46,9 @@ namespace PythonBinding.Tests.Designer } } - [TestFixtureSetUp] - public new void SetUpFixture() + public override void BeforeSetUpFixture() { base.ComponentCreator.SetEventPropertyDescriptor(new MockPropertyDescriptor("abc", "Button2KeyDown", true)); - base.SetUpFixture(); } public Button GetButton() diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadEventHandlerTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadEventHandlerTestFixture.cs index 1d2abf5256..352e9d63ab 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadEventHandlerTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadEventHandlerTestFixture.cs @@ -36,11 +36,9 @@ namespace PythonBinding.Tests.Designer } } - [TestFixtureSetUp] - public new void SetUpFixture() + public override void BeforeSetUpFixture() { base.ComponentCreator.SetEventPropertyDescriptor(new MockPropertyDescriptor("abc", "TestFormLoad", true)); - base.SetUpFixture(); } public EventDescriptor GetLoadEventDescriptor() diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormTestFixtureBase.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormTestFixtureBase.cs index 3f1db57be3..74223894c4 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormTestFixtureBase.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormTestFixtureBase.cs @@ -31,6 +31,7 @@ namespace PythonBinding.Tests.Designer [TestFixtureSetUp] public void SetUpFixture() { + BeforeSetUpFixture(); PythonComponentWalker walker = new PythonComponentWalker(componentCreator); form = walker.CreateComponent(PythonCode) as Form; } @@ -41,6 +42,13 @@ namespace PythonBinding.Tests.Designer form.Dispose(); } + /// + /// Called at the start of SetUpFixture method before anything is setup. + /// + public virtual void BeforeSetUpFixture() + { + } + /// /// Gets the python code that will be loaded. /// diff --git a/src/AddIns/Misc/ResourceToolkit/Test/CSharp/BclNRefactoryResourceResolverTests.cs b/src/AddIns/Misc/ResourceToolkit/Test/CSharp/BclNRefactoryResourceResolverTests.cs index df474df2f9..72920c8d2a 100644 --- a/src/AddIns/Misc/ResourceToolkit/Test/CSharp/BclNRefactoryResourceResolverTests.cs +++ b/src/AddIns/Misc/ResourceToolkit/Test/CSharp/BclNRefactoryResourceResolverTests.cs @@ -282,7 +282,7 @@ class A { ResourceResolveResult rrr = Resolve(CodeLocalCRMDeferredInitUsingApplyResources, 8, 20, null); TestHelper.CheckReference(rrr, "A", null, "A", "A.B"); - Assert.That(rrr, Is.InstanceOfType(typeof(ResourcePrefixResolveResult))); + Assert.That(rrr, Is.InstanceOf(typeof(ResourcePrefixResolveResult))); ResourcePrefixResolveResult rprr = (ResourcePrefixResolveResult)rrr; Assert.That(rprr.Prefix, Is.EqualTo("$this"), "Resource key prefix not detected correctly."); }