Last active
May 5, 2020 09:32
-
-
Save appel1/579d8a44a9768e9e6e5cf93c57e5d502 to your computer and use it in GitHub Desktop.
Test fixture that doesn't work very well using NUnit3TestAdapter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.IO; | |
using NUnit.Framework; | |
public class TestFixture | |
{ | |
public static IEnumerable<string> FormatFactory() | |
{ | |
yield return "Some string {0}"; | |
} | |
public static IEnumerable<string> InvalidCharacters() | |
{ | |
return Path.GetInvalidFileNameChars().Except(new[] { '\\', '/' }); | |
} | |
[Test] | |
public void InvalidCharacters([ValueSource(nameof(FormatFactory))]string format, [ValueSource(nameof(InvalidCharacters))]string specialCharacter) | |
{} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment