Skip to content

Instantly share code, notes, and snippets.

@appel1
Last active May 5, 2020 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save appel1/579d8a44a9768e9e6e5cf93c57e5d502 to your computer and use it in GitHub Desktop.
Save appel1/579d8a44a9768e9e6e5cf93c57e5d502 to your computer and use it in GitHub Desktop.
Test fixture that doesn't work very well using NUnit3TestAdapter
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