Skip to content

TestCase attirbute should not require parameters with default values to be specified. #257

@hiredgunhouse

Description

@hiredgunhouse

TestCase attribute requires all test parameters to be specified, even the ones with default values.
Try this example test

        [TestCase("va1")] // this does not work
        [TestCase("val1", false)] // this works
        public void Test1(
            string a,
            bool b = true)
        {
            Assert.Pass();
        }

The test above will say "Wrong number of arguments provided".
BTW. I'm using NUnit 2.6.3

I know this is not the best idea from the purity standpoint but still this would be occasionally useful.
I leave this to your decision as you have more experience and skills.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions