SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Unit test tree does not highlight some tests after run

Last post 06-30-2008 2:11 PM by Harry Steinhilber. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-29-2008 10:13 PM

    Unit test tree does not highlight some tests after run

    SharpDevelop 3.0.0.2970

    Problem: I have a base class that is not marked as [TestFixture], but has methods marked with [Test]. I have several derived classes that are marked as a [TestFixture] that derive from this base class. However, even though the base class's test are executed for each derived class, the base class's tests will not highlight in the Unit Testing window unless the base class is marked as a [TestFixture].

    Expected Result: The inherited tests on the derived class should highlight appropriately.

    Actual Results: The inherited tests continue to be marked as unknown/not run.

    Side Note: Even though the inherited tests are not highlighting, the tests defined on the derived class do highlight correctly.

    Example:
    using System;
    using NUnit.Framework;

    namespace Example.UnitTests
    {
       public class BaseTests
       {
           [Test]
           public void ThisShouldHighlightButDoesnt()
           {
               Console.WriteLine("I should turn green, but I don't.");
           }
       }

       [TestFixture]
       public class DerivedTests : BaseTests
       {
           [Test]
           public void ThisActuallyDoesHighlight()
           {
               Console.WriteLine("This actually does turn green.");
           }
       }
    }

  • 06-29-2008 11:09 PM In reply to

    Re: Unit test tree does not highlight some tests after run

    Sorry, after reviewing the repository log, I realize this bug was fixed in reversion 3032.

  • 06-30-2008 9:52 AM In reply to

    Re: Unit test tree does not highlight some tests after run

    Did you also verify this with a current build from our build server?

    Chris

  • 06-30-2008 2:11 PM In reply to

    Re: Unit test tree does not highlight some tests after run

    Yes, I installed revision 3153 from the build server last night and verified that the unit test tree does behave as expected. Thanks!

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.