Skip to content

Properties set on a parameterized method are not accessible to TestContext #548

@CharliePoole

Description

@CharliePoole

This post tells the story: https://groups.google.com/forum/#!topic/nunit-discuss/MEb7eESqeYI

As a solution, it seems we need to do one of two things:

  1. Provide a way to access the parent context.
  2. Reflect properties from the parent into the test context of the child.
    Add Monotouch build #1 would be simplest but may be subject to misuse. The user could tunnel all the way up to the assembly level by looking at the prior context. I can imagine tests that do different things depending on who their parent is!
    Data Driven TestFixture #2 is a bit complicated, since we have to allow for duplicate naming of properties at the higher and the lower level. We could implement it for test cases only, rather than copying all parent properties to all children.

A variant of #2 would be to allow the user to specify that a property is inheritable on a case by case method. At the moment, I like this idea best!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions