Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestCaseSource cannot refer to a parameterized test fixture #33

Closed
CharliePoole opened this issue Oct 20, 2013 · 2 comments
Closed

TestCaseSource cannot refer to a parameterized test fixture #33

CharliePoole opened this issue Oct 20, 2013 · 2 comments

Comments

@CharliePoole
Copy link
Contributor

TestCaseSource always instantiates the object providing data using the default constructor. Parameterized fixtures usually don't have one and adding one would mean that no parameters were available to generate data.

From https://bugs.launchpad.net/nunit-3.0/+bug/1239046

@craastad
Copy link

craastad commented Nov 5, 2013

Just got bit by this one. My work around was inheritance and setting the variable value I wanted in the child constructors. I'm looking forward to the fix.

markwhitfeld pushed a commit to markwhitfeld/nunit-framework that referenced this issue Nov 11, 2013
"TestCaseSource cannot refer to a parameterized test fixture"
 - allow specifying constructor parameters after data source method name
 - for the case where no method name would be required for the data
   source (ie, when the data source class itself implements
   IEnumerable), require the user to provide null for the method name
   - proposed to cater for the case where the only parameter to the
     constructor is a string
markwhitfeld pushed a commit to markwhitfeld/nunit-framework that referenced this issue Nov 11, 2013
  after getting this test to fail whilst working on Issue nunit#33
  - original code tried to get true/false variance in 10 attempts:
    the new test attempts up to 10000 times to get variance, quitting
    after the first time variance is found and bailing out with a useful
    message if variance isn't found in 10000 attempts.
CharliePoole added a commit that referenced this issue Feb 16, 2014
@CharliePoole CharliePoole modified the milestones: 3.0, 3.0Alpha1 Mar 2, 2014
@CharliePoole CharliePoole modified the milestones: 3.0, 3.0Alpha1 Apr 9, 2014
@CharliePoole
Copy link
Contributor Author

Since this is done, I'm moving it to the alpha1 milestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants