← Back to team overview

nunit-core team mailing list archive

[Bug 790708] Re: [feature] Add default names for TestCaseSource and ValueSource

 

Ahh
I've forgotten that class fields and properties can be source too.

I meant case when source is a method.

  private int[] SomeMethod()
  {
    return new int[] { 1, 2, 3};
  }

  [TestCaseSource] // Defaults to "SomeMethod"
  public void SomeMethod(int x)
  {
    ...
  }

sorry for inconvenience

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

Title:
  [feature] Add default names for TestCaseSource and ValueSource

Status in NUnit V2 Test Framework:
  New

Bug description:
  Using the name of the test method as a default for
  TestCaseSourceAttribute and ValueSourceAttribute helps avoid errors
  during refactoring with refactoring tools. Also it reduces the
  likelihood of mistyping.


References