← Back to team overview

nunit-core team mailing list archive

[Bug 784539] Re: Online docs for attribute inheritance incorrect/misleading

 

I'm not sure what docs you are looking at, but the online documentation
for each of the four attributes contains an "Inheritance" section that
explains how they work under inheritance. I verified that these sections
are present in the docs for 2.5, 2.5.2 and 2.5.10.

Of course, the documentation may have been incomplete on release. I
recall that we had a bug report regarding at least one of these pages,
which caused them to be fixed after the release.

Charlie

** Changed in: nunitv2
       Status: New => Invalid

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/784539

Title:
  Online docs for attribute inheritance incorrect/misleading

Status in NUnit V2 Test Framework:
  Invalid

Bug description:
  Using NUnit 2.5.2 with Resharper as the runner.

  The online docs for the
  [SetUp]/[TestFixtureSetUp]/[TearDown]/[TestFixtureTearDown] attributes
  are misleading/incomplete with regard to inheritance.

  I'm sure I've seen some documentation somewhere which explicitly
  states that inheritance is supported for methods decorated with these
  attributes and that they will be called in the logical order but I
  can't find it now.

  The online documentation for these attributes either doesn't mention
  inheritance at all or suggests that you need to manually call the base
  class method manually.

  I have just tested this (even with the same method names in the
  derived class) and everything works logically without having to call
  base methods:

  base:[TestFixtureSetUp]
  derived:[TestFixtureSetUp]

  base:[SetUp]  ** This section repeated per test
  derived:[SetUp]
  derived:[TearDown]
  base:[TearDown]

  derived:[TestFixtureTearDown]
  base:[TestFixtureTearDown]

  Cheers
  Simon


References