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

Support TestCase(parameter)? #106

Open
Dre-Tas opened this issue Oct 27, 2020 · 0 comments
Open

Support TestCase(parameter)? #106

Dre-Tas opened this issue Oct 27, 2020 · 0 comments

Comments

@Dre-Tas
Copy link

Dre-Tas commented Oct 27, 2020

Hey everyone,

I just realised that RTF doesn't take into consideration my "data driven" test (https://docs.nunit.org/2.5/testCase.html)? Am I missing something or is this actually the way it is?

You know when in unit testing you write the test but you want to run it with multiple inputs like this:

        [**TestCase**(@"C:\RootFolder\FirstChild\AnotherFolder")]
        [**TestCase**(@"P:\Folder\1234")]
        public void ValidateTrueWhenMatching(string path)
        {
            // Arrange
            var model= new Model { FilePath = path };

            // Act
            FilePathRule sut = new FilePathRule(model.FilePath);

            // Assert
            Assert.True(sut.IsValid());
        }

Is there a way to do this?

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

No branches or pull requests

1 participant